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
Are arrays classes in java?
How can a gui component handle its own events?
What are the important features of Java 8 release?
what is encapsulation in java? Explain
Explain restrictions for using anonymous inner classes?
How many digits is int32?
What is jpa specification?
What does it mean to be immutable?
What is the purpose of skeleton and stub?
What is considered an anti pattern?
What are basic data types?
How can we make a class singleton?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
What is toarray method in java?
How a variable is stored in memory?