what is overloading in java?
Answer Posted / jephin daviss
Overloading means that the same operator, method maybe used
for different purposes.
It is part of the OOP concept 'Polymorphism'.
1)Method overloading:Methods with same name, but different
argument types and number of arguments.
2)Operator overloading: Same operator can be used for
different ways, ex:'+' can be used for addition and for
concatenation.
3)Constructor overloading: We can define two constructors
for a same class, ie with same name, but difference in
argument types and number of arguments.
| Is This Answer Correct ? | 10 Yes | 7 No |
Post New Answer View All Answers
What is the concept of multithreading?
What is a Hash Table? What are the advantages of using a hash table?
What is the major difference between linkedlist and arraylist?
Distinguish between a predicate and a function?
What is variable argument in java?
Can we convert stringbuffer to string?
Name few java util classes introduced with java 8 ?
How to avoid memory leak in java?
What is finalize method?
Which java version is latest?
Can you declare the main method as final?
What is the purpose of garbage collection in java, and when is it used?
What is the set interface in java programming?
What is the base class of all exception classes in java?
How do you add an element to an arraylist in java?