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

Can we convert stringbuffer to string?

570


Is boolean a wrapper class in java?

616


What is package private scope in java?

542


What is a function easy definition?

535


What does 3 dots mean in java?

531






What is the most important feature of java? What is an interface?

526


Can we use switch statement with strings?

631


Write a program to print 15 random numbers using foreach of java 8?

551


Can we use both this () and super () in a constructor?

560


What happens when main () method is declared as private?

658


What is the symbol for space?

571


What is jvm? How its run?

666


List two java ide’s?

627


How do you sort in ascending order in java?

532


What is a values collection view ?

689