what is overloading in java?

Answer Posted / ak

Overloading is when the same method or operator can be used
on many different types of data.

For instance the + sign is used to add ints as well as
concatenate strings. The plus sign behaves differently
depending on the type of its arguments. Therefore the plus
sign is inherently overloaded.

Methods can be overloaded as well..same method with
different parameters is said to be method overloading.----
we can perform the similar operation in different ways for
different parameters.

Constructors can be overloaded as well...Overloaded
constructors provide multiple ways to initialize a new object

Is This Answer Correct ?    69 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is hashmap thread safe?

565


What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

634


Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

615


How do you define a parameter?

585


What is the equal sign?

567






What is string [] args?

563


What is the use of http-tunneling in rmi?

557


Difference between final and effectively final ? Why is effectively final even required ?

563


What is boolean logic?

565


How to sort an unsorted array in java?

615


What are the ways to instantiate the class class?

604


What is the maximum size of list in java?

547


What is the use of java?

530


What is use of functional interface in java 8? Explain

567


what is the purpose of using rmisecuritymanager in rmi?

570