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
How is hashcode calculated in java?
Why charat is used in java?
How do you declare an array that will hold more than 64KB of data?
Can we call the constructor of a class more than once for an object?
What is JVM and is it platform independent?
What is a singleton class? Give a practical example of its usage.
Implement two stacks using a single array.
What is a nested structure?
What is ph and buffers?
Which api is provided by java for operations on set of objects?
Difference between keyword and identifier.
Which is bigger double or float?
Explain importance of inheritance in java?
What is difference between string and stringbuffer?
What are the two main uses of volatile in Java?