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 a Null object?
What are the rules for variable declaration?
How many decimal places is a double?
Why is whitespace important?
How variables are stored in memory?
how does the run() method in runnable work? : Java thread
What is the meaning of variable in research?
What is bubble sort in java?
How a string is stored in memory?
Is 0 a real number?
Can you inherit a constructor java?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
What is difference between arraylist and list in java?
What is java in layman terms?
Is there is any difference between a scrollbar and a scrollpane?