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 string data type?
Is this valid in java ? Can we instantiate interface in java?
Can you override static methods?
How can a gui component handle its own events?
How can we create a synchronized collection from given collection?
Can a class have multiple subclasses?
What is the difference between length and length () in java?
What is use of inner class in java?
Explain about main thread in java?
what are the methods in object?
Which oo concept is achieved by using overloading and overriding?
What is unicode used for?
What is the access scope of protected access specifier?
Is char * a string?
What are class types in java?