public class Test {
public void Product(int a, int b) {
System.out.println("两个整数乘积:" + a + "*" + b + "=" + a * b);
}
public void Product(double a, double b) {
System.out.println("两个实数乘积:" + a + "*" + b + "=" + a * b);
}
public void Product(int a, int b, int c) {
System.out.println("三个个整数乘积:" + a + "*" + b + "*" + c + "=" + a * b * c);
}
}
-------------------------------------------------------------------------------------------
public class Test_A
{
public static void main(String[] arg)
{
Test test = new Test();
test.Product(3,5);
test.Product(7.5,10);
test.Product(3,4,5);
}
}
------------------------------------------------------------------------------------------