How can you prevent a class from being subclassed in Java?
public final class FinalClass { }
By using the static keyword
static
By using the final keyword
final
By making all methods private
private
By not providing any constructors