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 JVM and is it platform independent?
Give me example of derived data types.
Is namespace same as package in java?
Is 0 true or false in java?
What is the difference between compiler and jvm?
Can each java object keep track of all the threads that want to exclusively access it?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
Can an interface have a constructor?
how can you take care of mutual exclusion using java threads? : Java thread
What are the major advantages of internal iteration over external iteration?
What if static is removed from main method?
Why is sizeof not a function?
Why is logger singleton?
is it possible to instantiate the math class?
What is string made of?