posted 13 years ago
I think we may be jumping the gun here. Rakhesh, have you studied nested or inner classes yet? If you haven't, a better answer may be: don't declare a class as static at all, unless and until you have studied nested and inner classes.
After that, if your class is a nested or inner class, and if that nested class does not need any instance data from the outer class, and it's also not an anonymous or local class, then you can (and probably should) make the nested class static.
If the second paragraph above did not make sense to you, reread the first paragraph, and try again after you learn about nested and inner classes.