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 is merge sort in java?
In Java list the methods that can be overridden?
How can we create an immutable class in java?
what is difference betweem home interface and remote interface?
What data type is string java?
What is a boolean field?
What is the difference between == and === javascript?
What if constructor is protected in java?
How do you end a program?
What is the largest number a double can hold?
What is use of a abstract variable?
How many digits can a float hold?
How do you identify independent and dependent variables?
What is void class in java?
What is backdrop?