File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner interface ????

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think this is a beginner's question.
 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Thomas Paul:
I don't think this is a beginner's question.


You're right.. I'm moving this to intermediate
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic