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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "static class" Watch "static class" New topic
Author

static class

Prashanth Naidu
Greenhorn

Joined: Feb 13, 2004
Posts: 5
Hey all,
I dont understand why you declare a static class in java? I know static means that there is only one copy and every object does not have its own copy of a static method / field. so isn't static mainly used for fields or methods? Why use static for a class. e.g,: public static class myclass {}
-P
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
That is used for inner classes only. It simply means that the inner class can be used without instantiating the outer class.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static class