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
What is a jagged array in java?
What is "this" keyword in java? Explain
Difference between final and effectively final ? Why is effectively final even required ?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
What is the purpose of the main method?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
How do you write a conditional statement?
Convert Binary tree to linked list.
Is int primitive data type?
Where to store local variables?
Name few java util classes introduced with java 8 ?
What are java threads?
How do you create a method in java?
Can we overload destructor in java?
What is methods in java?