189k views
4 votes
A top level class may have only the following accessmodifier.

?? Package

?? Private

?? Protected

?? Public

1 Answer

5 votes

Answer: Public

Step-by-step explanation:

A top level class can have a public, as top level cannot be private and protected because the modifier private is not allowed. As, top level is a class which is not a nested class. Interface of a access modifier is either public or no modifier. There are two types of access control modifier are top level - public and member level- private, protected.

User Hijiangtao
by
7.7k points