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 difference between overriding & overloading?
What are the advantages and disadvantages of reference counting in garbage collection?
Which non-unicode letter characters may be used as the first character of an identifier?
Is java good for beginners?
How many digits can a float hold?
What is difference between null and void?
What will happen if static modifier is removed from the signature of the main method?
How does map works in java?
What checkbox method allows you to tell if a checkbox is checked?
What is void in java?
What types of index data structures can you have in java?
Is an object null?
What is the difference between exception and error in java?
What is the constructor?
Which collection is thread safe in java?