Java – Why Interface cannot have protected methods


Possible Duplicate:
Protected in Interfaces

In Java why cant I have protected methods in an interface?

Since according to Java specifications

protected access (denoted by the keyword protected) – a field or method accessible to any type in the same package, and to subclasses in any package.

If at all I have to use the interface, I am going to implement it and override the methods.
So if I am going to implement where the class has access to those methods, since method accessible to in any package. So whats the harm in declaring the method as protected in Interface ?

Best Solution

Protected methods are intended for sharing implementation with subclasses. Interfaces have nothing to offer as far as implementation sharing goes, because they have no implementation at all. Therefore all methods on interfaces must be public.