How can I prevent inheritance without marking a class final?
Declaring a class final is the simplest way to prevent extension, it is not clear why you would want to do it some other way. A more limited way to control overrides without preventing extension is to declare individual methods final. Actions: Follow-up, clarify or correct this answer. Submit a new question.