File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes package (default) access interface declarations Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "package (default) access interface declarations" Watch "package (default) access interface declarations" New topic
Author

package (default) access interface declarations

Leo Velazquez
Greenhorn

Joined: Apr 27, 2006
Posts: 13
If you declare an interface without a public modifier
making it package (default) access and you don't put any
modifiers on any of its methods or fields, are the methods
still implicitly public and the fields public,static, and final
or are the methods implicitly package (default) access
with the fields being package access, static, and final?
Thanks in advance to whoever can solve the mystery.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

The public-ness of the members of an interface doesn't depend on the public-ness of the interface itself. All interface methods are public, and all fields are public static final.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: package (default) access interface declarations
 
Similar Threads
Interfaces
Usage of members in Interface and Abstract
interface methods are called...
Inner Class in the Interface
interface