java - Why interface method scope is only public? -


this question has answer here:

in interfaces why method access specifier public why not protected?

interface ipractice {     void test(); // public     protected void test2(); // why not allowed } 

can 1 explain me this.

the whole point of interface exposes methods outside world implementation details can hidden.

what happens inside interface should not known outside world.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -