what is overloading and overriding with example?
Answer Posted / rajesh r
OVERLOADING MEANS SAME METHOD NAME WITH DIFFERENT
PARAMETERS.
BOTH SHOULD BE DEFINED IN SAME CLASS ITSELF.
OVERRIDING MEANS SAME METHOD NAME WITH SAME PARAMETERS.THIS
CAN ASSOCIATED IN A CLASS AND ITS SUBCLASS.(VIRTUAL,
OVERRIDE)
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Which sort is best in java?
What are static blocks in java ?
Is integer a class?
Which class contains a method: cloneable or object?
Which of the following classes will have more memory allocated?
What is pojo class in java?
Explain about strings in java?
Does importing a package imports its sub-packages as well in java?
Why arraylist is not synchronized in java example?
What are the drawbacks of reflection?
What do you understand by weak reference?
Can we define private and protected modifiers for the members in interfaces?
What do you mean by order of precedence and associativity?
How many times finalize method will be invoked? Who invokes finalize() method in java?
What is an infinite loop in java? Explain with an example.