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 many digits can a float hold?
Define reflection.
What does string mean in java?
How do you calculate roots in java?
Can static method access instance variables ?
Is string a datatype?
Explain what access modifiers can be used for methods?
What is double in java?
What is a modifier?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
How can you traverse a linked list in java?
What is command line argument in java?
Can we instantiate interface in java?
Name some classes present in java.util.regex package.
How many types of the indexof method are there for strings?