Multiple choice technology programming languages

which of the following modifiers can be applied to top level class(i.e., a class which is not enclosed by other class) select all that apply

  1. private

  2. protected

  3. transient

  4. public

  5. final

Reveal answer Fill a bubble to check yourself
D,E Correct answer
Explanation

A top-level Java class can only be declared with 'public', 'abstract', or 'final' access modifiers, or default (package-private) access. 'private', 'protected', and 'transient' cannot be applied to top-level classes.