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
Can we convert stringbuilder to string in java?
What is treemap in java?
What happens when I use / and % with a negative numerator?
What is the java reflection api? Why it’s so important to have?
What are serialization and deserialization?
Explain the difference between comparator and comparable in java?
Does java linked list allow duplicates?
What is an i/o filter?
What class allows you to read objects directly from a stream in java programming?
What are the advantages of java over C++?
what is abstract class in Java?
What are parameters in a method?
Can we use both this () and super () in a constructor?
Can we create an object of private class?
Which is easier netbeans or eclipse?