This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Static Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Static Class" Watch "Static Class" New topic

Static Class

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Can a class be static ???
Tony Docherty

Joined: Aug 07, 2007
Posts: 2302
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.
GeeCON Prague 2014
subject: Static Class