• 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

Class Contents

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to my knowledge a class can contain
1.Member variables
2.Member functions
3.Static blocks
4.Non-Static blocks
5.Constructors
6.Inner Classes

Is there are any things which a class can contain other than the above specified things.
 
Ranch Hand
Posts: 657
Spring VI Editor Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

According to my knowledge a class can contain
1.Member variables
2.Member functions
3.Static blocks
4.Non-Static blocks
5.Constructors
6.Inner Classes

Is there are any things which a class can contain other than the above specified things.

Yes; class (static) members (variables and methods) and nested classes (superset of inner classes), nested interfaces, etc. off the top of my head.

For the complete list, check the JLS: http://java.sun.com/docs/books/jls/third_edition/html/classes.html
reply
    Bookmark Topic Watch Topic
  • New Topic