Professional Documents
Culture Documents
5 6100300418837906851
5 6100300418837906851
class Overload4
System.out.println(Math.max(x,y));
if((int)ch1>(int)ch2)
else
if(str1.length()>str2.length())
}}
i. void compute( int , char ) : to compute the square of the integer argument if the given
ii. void compute(double , char) : to compute volume of a cube if the given character
iii. void compute(int, int , char) : to compute area of a rectangle if the given character
Diagonal of cube = a√
class Overload5
{
public void compute( int num , char ch)
if (ch=='s')
System.out.println("Square ="+(num*num));
else
System.out.println("Cube ="+(num*num*num));
if (ch=='v')
else
if(ch=='a')
else
System.out.println("Perimeter of rectangle ="+(2*(l+b)));
i. double series(double n) with one double arguments and returns the sum of the series.
sum = ……………….. +
ii. double series (double x, double n) with two double arguments and returns the sum of
the series .
sum =