public class Example4_10{
public static void main(String[] args){
people zhang=new people();
System.out.printf("面积:"+zhang.getArea(10,8.88));
System.out.printf("面积: "+zhang.getArea(2.90,10));
}
}
class people{
double getArea(int x,double y){
return x*y;
}
int getArea(double x,int y){
return (int)x*y;
}
}
转载于:https://www.cnblogs.com/zhangqiang618/archive/2013/03/05/2945152.html