yanrun
public class Test {
public static void main(String[] args){
int num1, num2, num3; //产生的随机数
int maxNum = max(max(num1, num2), num3);
System.out.println(maxNum);
}
public static int max(int num1, int num2) {
return num1 > num2 ? num1 : num2;
}
}