File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static class

 
Prashanth Naidu
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is used for inner classes only. It simply means that the inner class can be used without instantiating the outer class.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic