Multiple choice technology programming languages

Classes in Java cannot be made static.

  1. True

  2. False

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

Top-level classes in Java cannot be declared static. However, nested classes (inner classes) inside another class can be declared as static. Static nested classes are different from inner classes - they don't have access to instance members of the enclosing class.