English, asked by rishilaugh, 1 year ago

difference between overloading and overriding in java

Answers

Answered by aqibshaikh
0
Method overloading :

- is the increase in readability of the program.

- is performed within the class.

- in overloading, parameters must be different.

- is the example of compile time polymorphism.

Method overriding :

- is the specific implementation of the method.

- occurs in two classes that have inheritance.

- in overriding, parameters must be same.

- is the example of run time polymorphism.


Hope it's useful for you.

All the best.
Answered by Anonymous
2

Answer:

hey \: pls \: like \: my \: answer

Overloading occurs when two or more methods in one class have the same method name but different parameters.

Overriding allows a child class to provide a specific implementation of a method that is already provided its parent class.

Similar questions