答案:public class NFactorial
{
public static int add(int a, int b)
{
return a + b;
}
public static int sun(int a, int b)
{
return a - b;
}
public static double mul(int a, int b)
{
return a * b;
}
public static double div(int a, int b)
{
return (double)a/b;
}
public static void main(String[] args)
{
System.out.println(NFactorial.add(5, 5));
System.out.println(NFactorial.sun(5, 5));
System.out.println(NFactorial.mul(5, 5));
System.out.println(NFactorial.div(5, 5));
System.out.println();
}
}
上一个:Java初学者关于servlet的问题
下一个:java与access2003连接。