Alex Rivera | Logout

Protected in Interfaces

Asked 2011-03-21T11:25:34.320
172

Why are all methods in an interface definition implicitly public? Why does it not allow a protected method?

Edit
Report

1 Answer

76

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.

answered 2011-03-21T11:28:35.403

Your Answer