aspose file tools*
The moose likes Beginning Java and the fly likes why can't we declare a protected fields in interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why can Watch "why can New topic
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: 39396
    
  28
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why can't we declare a protected fields in interface?