package javaapplication16;
class calculator
{
public int sum(int x,int y)
{
return x+y;
}
public int sum(int x,int y,int z)
{
return x+y+z;
}
public double sum(double x,double y,double z)
{
return x+y+z;
}
}
public class JavaApplication16
{
public static void main(String[] args)
{
calculator c=new calculator();
double r =c.sum(3, 4, 10);
System.out.println("sum is "+r);
}
}
No comments:
Post a Comment