Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Static Class

 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a class be static ???
 
Tony Docherty
Bartender
Posts: 2957
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes and No. There are a number of different types of class in Java, these can be grouped in to 2 main categories Top Level Classes and Inner Classes.
Inner Classes can be subdivided into 4 types Anonymous, Local, Member and Nested Top Level. Of all these class types only one type can use the static keyword, that is the Nested Top Level class. This basically a Member class declared as static.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic