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
How many types of the indexof method are there for strings?
why would you use a synchronized block vs. Synchronized method? : Java thread
Is an object null?
How many types of array are there?
Can we store variables in local blocks?
What are the differences between getting and load method?
Can a class be defined inside an interface?
What is a numeric format?
How do you control extraneous variables?
Is there a sort function in java?
Explain method overloading?
What are static variables and functions?
What does string mean in java?
Does list allow duplicates in java?
What is the major difference between linkedlist and arraylist?