How can you prevent a class from being subclassed in Java?
Declare the class as final
final
Declare the class as private
private
Declare the class as static
static
Declare the class as sealed
sealed