Why do inner class cannot have static declaration except
static nested class?

Answer Posted / adithya

Static have only one copy in memory. For class we have to
create objects. But for static we cannot create.

Is This Answer Correct ?    7 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will happen when using pass by reference in java?

514


Are arrays passed by reference in java?

481


How do I stop concurrentmodificationexception?

504


which class is the wait() method defined in? : Java thread

519


Difference between keyword and identifier.

589






Can we create an object of static class in java?

591


How to optimize the javac output?

591


Why is whitespace important?

544


Explain what access modifiers can be used for variables?

587


How can you handle java exceptions?

519


What are the disadvantages of object oriented programming?

586


Are constructors methods?

563


Differentiate between nested and inner class in java.

544


Explain about the select method with an example?

585


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

535