Answer Posted / ranganathkini
A class can be marked by the "private" access specifier only
if its a nested member of another class.
Top level classes cannot be marked as "private". Hence you
can have private classes in a java file but they must be
nested inside another class.
| Is This Answer Correct ? | 208 Yes | 16 No |
Post New Answer View All Answers
What is constructor and virtual function? Can we call a virtual function in a constructor?
When do we need to use internal iteration? When do we need to use external iteration?
How to change value in arraylist java?
Is space a char?
Differences between C and Java?
What is struts in java?
What do you mean by singleton class in java?
What is proper subset?
Why pointers are not used in java?
What is r in java?
How do you create a method in java?
What is mutable object and immutable object?
Is passing by reference faster?
why an outer class cannot be declared as private?
Why javac is not recognized?