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
How will you invoke any external process in java?
What does n mean in java?
What are the restrictions imposed on method overriding?
What is the maximum size of byte array in java?
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
How hashmap increases its size in java?
What is the difference between a constructor and a method?
What is a final class ?
What is substring in java?
Explain about fail safe iterators in java?
What is the final class?
What are void methods?
What are basic data types?
Is stringwriter thread safe?
Why scanner is used in java?