Why are all methods in an interface
definition implicitly public
? Why does it not allow a protected
method?
Advertisement
Answer
Because an interface is supposed to mean “what you can see from outside the class”. It would not make sense to add non-public methods.