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
explain different ways of using thread? : Java thread
How to check if a list is sorted in java?
Can we inherit inner class?
Can we declare an interface as final?
Why do we use regex?
Why does it take so much time to access an applet having swing components the first time?
What is a JAR file?
What is the difference between sleep and wait in java?
what is the difference between yielding and sleeping? : Java thread
What is a marker interface?
which pattern is default in scanner package?
How do you square a number in java?
What steps are taken when the OS shifts from one-thread execution to another?
What are sets in java?
What are 5 boolean operators?