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 technique is carried out to find out if a particular string is empty?
What is java util collection?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
Which is faster string or stringbuilder?
What are thread local variables?
What is JFC?
What is data type example?
What are the different types of sorting in java?
Is java still relevant?
Explain java thread life cycle.
Can we have this () and super () together?
When should I use singleton pattern?
Is null false in java?
How do you sort a set in java?
What is flush () in java?