Why are all methods in an interface definition implicitly public? Why does it not allow a protected method?
interface
public
protected
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.
2.1m questions
2.1m answers
60 comments
57.0k users