File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes inner interface ???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "inner interface ????" Watch "inner interface ????" New topic
Author

inner interface ????

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
abstract inner class is possible so the question came in my mind is inner interface is also possible ???

one more question is how abstract inner class will beheave ?? when we will extends them & when we will implement their methods ???

please help ...

thanks a lot .
[ January 11, 2005: Message edited by: rathi ji ]
Karthik Vaidiswaran
Greenhorn

Joined: Jan 11, 2005
Posts: 16
Hello,

This is regarding your question about inner interfaces.......

Member Interfaces are never INNER. Member interfaces are always implicitly static. This is from JLS http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#262890

Thanks
Karthik
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I don't think this is a beginner's question.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by Karthik Vaidiswaran:
Hello,

Member Interfaces are never INNER. Member interfaces are always implicitly static.


You are confusing me .... interface means abstract ( nothing is concrete ) ( and they are impicitly public & abstract ) and abstract & static can't live simulteanously ....

Please solve my doubt ...

thanks .
Karthik Vaidiswaran
Greenhorn

Joined: Jan 11, 2005
Posts: 16
Methods declared in an interface are implicitly public and abstract. These methods cannot have modifiers such as static/native/synchronized/strictfp.

Fields (member variables) in an interface are implcitly public static final.

When you consider modifiers for interface itself, they can be private/protected for Nested interfaces. Nested interfaces are implicitly static. You cannot apply private/protected/static for top-level interfaces.

Refer http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html#235947 for more details.

Thanks
Karthik.
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1824

Originally posted by Thomas Paul:
I don't think this is a beginner's question.


You're right.. I'm moving this to intermediate


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inner interface ????