Answer Posted / tulasi
Overloading is the concept where there are many methods
with the same name in a class but the arguments passed
differ.Consider the example of method called
addition.Addition can be between integers,floating point
numbers etc., so same name addition is used for the various
methods of class but the parameters passed differ, it may
be integer or floating point.When the jvm checks for the
methods, the method is choosen depending upon the argument
passed.
Overriding is the concept where the method name is
same,arguments passed are also same and the return type is
also same.but the method implemented depends upon where its
defined and called
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What is the difference between == and === javascript?
Explain creating threads by extending thread class ?
How will you serialize a singleton class without violating singleton pattern?
What is the different types of functions?
Which is dependent variable?
What is protected access modifier?
Can private class be extended java?
How many types of gc are there in java?
Explain restrictions for using anonymous inner classes?
What does the three dot emoji mean?
What is the use of volatile in java?
What is backdrop?
What is empty list in java?
How do you execute a thread in java?
Can we convert integer to string in java?