Answer Posted / manoj purohit
•Only nested classes can be private. If a top-level class
were private, nothing could access it.
So, private nested classes are just like other private
members (methods and variables)--they can only be
accessed "within the body of the top level class that
encloses the declaration of the member or constructor"
Private classes are to be used only by their declaring
class (more or less) just like other private members
| Is This Answer Correct ? | 117 Yes | 2 No |
Post New Answer View All Answers
State the main difference between c++ and java?
What is the integer of 16?
What do you mean by global variable?
What all methods are used to prevent thread execution ?
What is the difference between a switch statement and an if statement?
Is oracle java 11 free?
What is a generic code?
Why main() method is public, static and void in java ?
What is difference between equals and hashcode method?
Give any two differences between C++ and java.
Why main method is called first in java?
What is the difference between hashset and treeset in java?
What is constant in programming?
How to reverse string in java?
What is the difference between a factory and abstract factory pattern?