aspose file tools*
The moose likes Beginning Java and the fly likes Static class?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Static class??" Watch "Static class??" New topic
Author

Static class??

Vishnu Sharma
Ranch Hand

Joined: Feb 03, 2010
Posts: 55
Can we make any class static?? Or only methods & variables in a class can be static??


Regards,
Vishnu
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3266
    
  52

a nested class can be static


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Vishnu Sharma
Ranch Hand

Joined: Feb 03, 2010
Posts: 55
Devaka Cooray wrote:a nested class can be static


I did not get you properly. Can you please, explain a bit more giving any small example??
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14428
    
  23

Example:

For more information, see: The Java Tutorials - Nested Classes

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Static class??