| Author |
why can't we declare a protected fields in interface?
|
jayaprakash kaluva
Greenhorn
Joined: Aug 01, 2012
Posts: 4
|
|
Hi,
Why can't we declare variables in interface as "PROTECTED".
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
Welcome to the Ranch
Because an interface is intended to create (part of) the public interface of a class. Everything in an interface is therefore implicitly public.
|
 |
 |
|
|
subject: why can't we declare a protected fields in interface?
|
|
|