why are all the metods in an interface public?
why not protected ?
Printable View
why are all the metods in an interface public?
why not protected ?
because its an interface. as its name denotes, it is the interface through which you access an object implementing it. the concept of private / protected is an implementation detail, which is left to an abstract class.
thanks!