What is the difference between overloading and overriding a
function?
Answer Posted / ankur dhoot
In overloading two function should have different signature
but overriding show have exactly same signature.
Overloading generally happens in same class but overriding
mandatory requires super and sub class to happen.
Compiler decides overloading at compile time but overriding
is detected at run time.
Overloading is called static polymorphism while overriding
is called dynamic polymorphism.
| Is This Answer Correct ? | 53 Yes | 6 No |
Post New Answer View All Answers
Can a final method be overloaded?
How many bytes is a string java?
Which is easier netbeans or eclipse?
How will you get the platform dependent values like line separator, path separator, etc., ?
Can we return null in java?
Is list thread safe in java?
What is the maximum size of list in java?
Do I need java for windows 10?
What is meant by anonymous class?
What java is used for?
What is difference between java and java ee?
What does arrays sort do in java?
Give a practical example of singleton class usage?
What is a nullable field?
Have you ever used hashtable and dictionary?