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 are desktop procedures?
Is 64bit faster than 32 bit?
What is the largest long allowed by java?
How will you add panel to a frame?
What is variable argument in java?
How do you do descending order in java?
Explain a few methods of overloading best practices in java?
Can private class be extended java?
What is javac used for?
What is udp in java?
How can I right-justify a string?
What is output buffer?
What is the difference between && and & in java?
What is empty string literal in java?
Is set ordered?