aspose file tools
The moose likes Beginning Java and the fly likes static class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: static class
 
Similar Threads
non-static method calling static variable
Question about Inheritance and Static Instance Variable
"this" in constuctor problem
Inner Classes - Static Declaration
Creating a Connection Pool