165k views
1 vote
A top level class without any modifier is accessible to

?? any class

?? any class within the same package

?? any class within the same file

?? any subclass of this class

1 Answer

1 vote

Answer: A top level class without any modifier is accessible to any class within the same package.

Explanation: A top level class is class whose declaration occur in the body of their own class therefore it is not a nested class.It cannot be declared in any other class.Private modifier is not allowed in the top level class because there would be no access in the class. Therefore top level class which does not have any modifier can be accessed by any class within the same package .

User Regressor
by
5.7k points