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
What is methodological framework?
What are dot operator queries?
What is a char in java?
Can we inherit a class with private constructor?
Can an object subclass another object?
Explain about exception propagation?
Why stringbuilder is not thread safe in java?
When is finally block not called?
Can a class be private or protected in java?
What is a dot notation?
What is the benefit of using enum to declare a constant?
What is multi-catch block in java?
What is runtime locatable code?
What does three dots mean in java?
How use .contains in java?