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 a JAR file?
Why can't we use static class instead of singleton?
How can you write a loop indefinitely in java programming?
How many types of java are there?
How do you end a program?
Where is singleton pattern used?
How do I type unicode?
What is callable java?
What are byte codes?
How to display all the prime numbers between 1 and 100
Can we extend singleton class?
What is difference between equals and hashcode method?
When should you make a function static?
How we can declare a static variable?
Why do people says “java is robust”?