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 an object is serialized in java?
What is map in java?
What is meant by polymorphism?
What is data type example?
What defines function?
What is the numeric promotion?
Explain notifyall() method of object class ?
What is double in java?
How do you decide when to use arraylist and linkedlist?
What is a war file?
Write a program to print all permutations of string?
Why is string builder not thread safe?
Can vector have duplicates in java?
Explain 5 features introduced in jdk 1.7?
What is finalize()? Is finalize() similar to a destructor?