Why should we override a method? [duplicate]
问题 This question already has answers here : Why is method overloading and overriding needed in java? [duplicate] (3 answers) Closed 5 years ago . Recently I was asked this question "why should one override a method? " I replied, if I have a class with 10 methods and I want to use all of its functionality except one method, then I will override that method to have my own functionality. Then the interviewer replied in that case why cant we write a new method with a different name and use that