java - Why interface method scope is only public? -
this question has answer here:
- protected in interfaces 12 answers
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
Post a Comment