Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is overloading and overriding in java?

Category: Java

When we have more than one method with same name in a single class but the argument are different, then it is called as method overloading.
Overriding concept comes in picture with inheritance when we have two methods with same signature, one in parent class and another in child class. We can use @Override annotation in the child class overridden method to make sure if parent class method is changed, so as child class.

Leave a Reply

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