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 are encapsulation, inheritance and polymorphism?
Which java ide is used the most?
What is an iterator java?
Can you sort a string in java?
Is it compulsory for a try block to be followed by a catch block in java for exception handling?
Is vector thread safe in java?
What is java util concurrentmodificationexception?
What is use of set in java?
What is the purpose of final keyword and when to use it?
Is a method a function?
Can a final variable be initialized in constructor?
How will you compute size of a structure?
Can a class be protected in java?
Which class is the superclass for all the classes?
What is the difference between heap and stack memory?