Why do inner class cannot have static declaration except
static nested class?
Answers were Sorted based on User's Feedback
Answer / vipul
Inner classes share a intimate relationship wth the outer
class which means to instantiate the inner class we need to
obtain the object of the outer class.in any case the inner
class contain any static member then we can access it only
with inner class name in that case we won't require its
object whch means we won't require the outer class
object.but java doesn't allow this if we want to access ny
if the inner class data member we must ahve outer class n
inner class object....queries r most welcomed..
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / 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 |
What is keyword and identifier?
what is associative array
Name the method of a Container that can be used to cause a container to be laid out and redisplayed?
How big is a pointer?
Difference between java and javascript
What are the object and class classes used for?
how can you catch multiple exceptions in java?
Why is multiple inheritance not supported in java?
Features of JAVA ? In which version of java synchronizedXXX() methods are included in Collections class.
What is a loop java?
Explain about OOPS concepts and fundamentals.
What is the purpose of checked and unchecked exceptions in JAVA?