Multiple choice technology programming languages

What modifiers may be used with top-level class?

  1. Public

  2. Private

  3. Abstract

  4. Final

  5. Protected

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

Top-level classes (not inner classes) can only have public or package-private (no modifier) access. They can additionally be abstract or final. Private and protected are NOT allowed for top-level classes - these modifiers only apply to class members (fields, methods, inner classes).