What is the difference between overloading and overriding a
function?
Answer Posted / raj kashyap
OVERLOADING is possible to create methods that have the same
name, but different parameters lists and different
definitions.overloading is used when objects are required to
perform similar task but using different parameters.
OVERRIDING is used when we want an object to respond to the
same method but have different behaviour when that method is
called. that means we override the method defined in super
class.yhis is possible by defining a method in subclass that
has same name,same argument& same return typeas method in
super class.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What kind of variables a class can consist of?
What are the supported platforms by java programming language?
Why there are some null interface in java? What does it mean?
Can we pass a primitive type by reference in java? How
What is an exception? difference between Checked and Unchecked exception in Java
Is Constructor possible in abstract class in java ?
Is java hard to learn?
What is the synonym of string?
What are constructors in java?
What is the difference between normal report & matrix report?
Is java same as core java?
What is the function of character?
How is hashcode calculated in java?
Difference between ‘>>’ and ‘>>>’ operators in java?
What is private static in java?