You are on page 1of 1

Method Overloading:

if a class contains more then one method with same name but different parameters
than it is called method overloading.
means signature of method is different.
which method is called depends on the types of parameters which we pass at the time
of calling.

there are 3 ways to perform overloading in java


1 by different no of parameters
2 by different types of parameters
3 by different sequence of parameters.
***----------------------------**********
Overloading Assignment:

create a java program which overload area method for calculating area of different
shalps like
ractangle,square,circle,triangle.
and call all shaps area method from main method.

You might also like