Answer Posted / p.nandakishore
non static inner classes can access all the members of the
outer class i.e both static and nonstatic members.In
nonstatic inner classes we cannot have static declarations
done.To access non static inner class members we outer
class reference.
static inner classes can access only static members of the
outer class.In static inner class we can have static
declarations done. To access static inner class members
no need of outer class reference.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the difference between static method and instance method in Java?
What is difference between c++ and java ?
Can we declare a class as static?
What are recursive functions?
What is role of void keyword in declaring functions?
What are drawbacks of singleton class?
What is hashtable and explain features of hashtable?
What is polymorphism java example?
Why there is no call by reference in java?
What are the limitations of procedural programming approach?
What is the use of toarray () in java?
Can you explain the private protected field modifier?
What is a method type?
how is final different from finally and finalize in java?
Can we write any code after throw statement?