Multiple choice java

A class cannot be declared:

  1. Static

  2. Private

  3. Default

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, top-level classes cannot be declared as private or protected; they must be public or have default (package-private) access. While inner classes can be private, the general rule for classes is that they cannot be private.