employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Engaged Employer

Tata Consultancy Services Interview Question

Q: "Can you explain the difference between overloading and overriding in Java?"

Interview Answer

Anonymous

Apr 16, 2025

I explained that overloading is when multiple methods in a class have the same method name but different parameters, whereas overriding is when a subclass provides a specific implementation for a method that is already defined in its superclass. I provided examples to illustrate the difference.