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


Please Help Members By Posting Answers For Below Questions

What is a JAR file?

600


Why can't we use static class instead of singleton?

505


How can you write a loop indefinitely in java programming?

561


How many types of java are there?

575


How do you end a program?

556






Where is singleton pattern used?

532


How do I type unicode?

542


What is callable java?

563


What are byte codes?

665


How to display all the prime numbers between 1 and 100

512


Can we extend singleton class?

536


What is difference between equals and hashcode method?

576


When should you make a function static?

549


How we can declare a static variable?

658


Why do people says “java is robust”?

566