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 major difference between linkedlist and arraylist?
What is a for loop in java?
How do you sort in ascending order in java?
How many types of classes are there in java?
What is the size of int?
How many arguments can a method have java?
Can we override private constructor in java?
Can inner class extend any class?
What are the advantages of exception handling?
How do you create a reference in java?
What is replaceall in java?
What are predefined functions?
What is static synchronization?
What is the reason behind using constructors and destructors?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?