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 collections framework?
What are the kinds of polymorphism?
Why java is made?
What is the difference between method overriding and overloading?
What is multi-catch block in java?
Is zero a positive integer?
Does A Class Inherit The Constructors Of Its Superclass?
Why can't we make a class private in java?
How do you declare an array in java?
How to remove the trailing spaces from a string?
Does java runtime require a license?
Can I use % with real numbers?
How to convert string to byte array and vice versa?
What is used of static keyword in java?
What is the difference between sop and work instruction?