Home » Core Java » Can we override final method in Java

Can we override final method in Java

Can we override final method in Java ?

1.  This question is generally asked to  0-3 years of experience Java Developers in the interview round.The answer is No.

2.  Final methods can not be overridden. The idea behind declaring a method final is to use it as it is declared.This is  as per java design.

3. When we use final keyword in a method of the Super class ,then all sub classes  inheriting the super class can not override this method.Similarly all private methods of super class are implicitly final ,as these private methods can not be accessed in sub classes.


Leave a comment

Your email address will not be published. Required fields are marked *

1 + 18 =