Which of the following method definitions will prevent overriding of that method?
Select 4 options
Correct Options are : A B C E
For Option A. public final void m1 ()
final methods cannot be overridden. That is the purpose of final keyword.
For Option C. public static final void m1 ()
Keep in mind that static methods are not overridden, they are shadowed.
For Option E. private void m1 ()
private methods are not inherited at all so there is no question of overriding a private method.