method overload
class overload extends over{
public static void main(String[] args)
{
over o=new over();
o.num(4,7);
o.num(20000000000.4,10000000002.4);
o.num(32.0,4.2);
}
}
public class over{
void num(int x,int y)
{
int sum=0;
sum=x y;
System.out.println("the sum is =" sum);
}
void num(double a,double b)
{
double sub=0;
sub=a-b;
System.out.println("the differnce is =" sub);
}
void num(float c,float d)
{
float mul=0;
mul=c*d;
System.out.println("the mul is =" mul);
}
}
its working perfectly..
for int and double..
float is not executing..whereas double is excecuting twice..