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
How do I stop concurrentmodificationexception?
Is passing by reference faster?
Can we access instance variables within static methods ?
How do I type unicode?
what is anonymous class in java?
How do you check if a number is a perfect square?
How many bits is a float?
How to read and write image from a file ?
How will you compute size of a structure?
When will we use them?
Why do I need to declare the type of a variable in java?
Explain yield() method in thread class ?
What is an off by one error in java?
What is the default access specifier for variables and methods of a class?
What do you understand by casting in java language?