Why do inner class cannot have static declaration except
static nested class?
Answer Posted / 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 |
Post New Answer View All Answers
What is the synchronized method modifier?
What is the difference between Java1.4 and Java1.5
Is array an object in java?
What does sizeof return?
define the terminology association.
Why does java have two ways to create child threads? Which way is better?
What is an exception? difference between Checked and Unchecked exception in Java
What is strings in java?
Can I uninstall java?
What do you mean by thread safe?
How many ways can an argument be passed to a subroutine and explain them?
What are bind parameters?
How does arraylist work in java?
Is main a function?
Can we change the scope of the overridden method in the subclass?