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
Is there any difference between synchronized methods and synchronized statements?
What is the equal sign?
What are the differences between heap and stack memory in java?
How does compareto method work?
How many inner classes can a class have?
How the metacharacters are different from the ordinary characters?
What is a lambda expression ? What's its use ?
Explain about class in java?
Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview
Can we define private and protected modifiers for the members in interfaces?
Give any two differences between C++ and java.
How can you handle java exceptions?
What advantage do java's layout managers provide over traditional windowing systems?
What is the difference between public, private, protected, and friend access?
How are java objects passed to a method and what are native methods?