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 does split function do in java?
Can you instantiate the math class?
What are basic keywords?
How can you read content from file in java?
What is isa relationship?
When is update method called?
Explain the significance of class loaders in bootstrap?
Define "Access specifiers" in java.
Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.
Define a java class.
How can we run a java program without making any object?
Explain the difference between treeset and treemap in java?
Why main method is static in java?
What is a singleton class in Java?
Why generics are used in java?