Why non nested classes in java are not having marked as
protected access specifier
Answer Posted / yayati pavan
When the non nested class declared as public or
default(public) the jvm can access the class and execute.
So non nested class must always public. other wise jvm can't
access the class.
| Is This Answer Correct ? | 7 Yes | 9 No |
Post New Answer View All Answers
How will you add panel to a frame?
What does the three dot emoji mean?
Which java collection does not allow null?
What is the difference between compile-time polymorphism and runtime polymorphism?
Write an algorithm for quick sort?
What is the difference between keyword and identifier?
What are the types of methodology?
Can we have 2 main methods in java class?
What is the difference between normal report & matrix report?
What is field name?
What is bubble sorting in java?
What is the meaning of nullable?
What is Garbage Collection in Java
What do you understand by soft reference?
What's the difference between int and integer in java?