What is the difference between overloading and overriding a
function?
Answer Posted / ghanshyam dobariya
OVERLOADING: Declaration and definition are in the same
class i.e. a class in which they are defined.
OVERRIDING:Declaration is done at super class while actual
definition is define in sub class.
OVERLOADING: Any code mistake we make in defining it's code
, detected at compile time
OVERRIDING: Any code mistake we make in defining it's code
,detected at run time.
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What is the final class modifier?
what is bmg file and how to create that files?what will it contailn?
What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?
How to perform selection sort in java?
What is Hierarchy of exception?
Explain an intermediate language?
What is Java Reflection API? Why it’s so important to have?
Explain spliterator in java8?
Where are the local variables stored?
What is void in java?
What is percentage in java?
What is an immutable class? How to create an immutable class?
What are format specifiers in java?
When should I use singleton?
How can you generate random numbers in java?