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
Explain enumeration in java?
Does constructor be static?
What is operator overloading. Is it is supported in java?
Why collection doesn’t extend cloneable and serializable interfaces?
How do you convert an int to a string in java?
Can we call a non-static method from inside a static method?
What is formatted output in java?
Why scanner is used in java?
Why is sizeof not a function?
What are default methods ?
How do you square a number?
Why generics are used in java?
What is file in java?
what is the volatile modifier for? : Java thread
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?