Originally posted by Anuradha Jayanti:
static classes cannot be instansiated.
If you want to create a class but you dont want it to be instantiated, then declare the class's constructor as private.
Do both the cases create the same effect? or are they different?
Hmm.... how to put this...
Outer classes cannot have a static modifier, only nested classes can be static and static nested classes can be instantiated using:
A class with pivate constructors can also be instantiated. Remember private only means class only access. So if the class has a methoda that calls a private constructor, and that method is visble to other classes, another class can create an instacne of that class with a private constructor by calling that visible method.