• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Terms about inner classes

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am confused about this terms. Can anyone clarify them for me?

local class, nested class, inner class, member class and anonymous class

Will they appear on the exam?

Thanks!
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are some good starting points...

MEMBER CLASS

"A member class is a class whose declaration is directly enclosed in another class or interface declaration."

Ref: http://java.sun.com/docs/books/jls/third_edition/html/classes.html#246026


NESTED CLASS

"A nested class is any class whose declaration occurs within the body of another class or interface."

Ref: http://java.sun.com/docs/books/jls/third_edition/html/classes.html


INNER CLASS

"An inner class is a nested class that is not explicitly or implicitly declared static."

Ref: http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3


LOCAL CLASS

"A local class is a nested class (�8) that is not a member of any class and that has a name."

Ref: http://java.sun.com/docs/books/jls/third_edition/html/statements.html#247766


ANONYMOUS CLASS

"An anonymous class declaration is automatically derived from a class instance creation expression by the compiler."

Ref: http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#252986
[ February 08, 2006: Message edited by: marc weber ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic