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 static (class) method and instance method?
What is protected in java?
Give few difference between constructor and method?
What is stream api in java8?
How do you reverse a word in java?
Explain the public class modifier?
Can classes declared using the abstract keyword cab be instantiated?
Can one thread block the other thread?
What is a locale?
What will be the default values of all the elements of an array defined as an instance variable?
How does multithreading take place on a computer with a single cpu?
'A class is a template for an object' explain this statement.
What is equlas() and hashcode() contract in java? Where does it used?
What is empty string literal in java?
What is the difference between this() and super() in java?