The main reasoning behind making a method final is to prevent it from being overridden by subclasses . By making a method final, you not only indicate but also ensures that your tried and tested method is not overridden.
Read moreWhat happens when a method is declared as final?
When a method is declared with final keyword, it is called a final method. A final method cannot be overridden . The Object class does this—a number of its methods are final. We must declare methods with the final keyword for which we are required to follow the same implementation throughout all the derived classes.27 Eki 2021
Read moreCan we make method final in Java?
You can declare some or all of a class’s methods final . You use the final keyword in a method declaration to indicate that the method cannot be overridden by subclasses. The Object class does this—a number of its methods are final .
Read more