import java.io.*;
import java.util.*;
public class Demo{
public static void main(String[] args)throws IOException{
String s = new String("");
int[] a={0,0};
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.print("输入两个int型的数(以一个空格隔开):");
s = br.readLine();
Scanner scan = new Scanner(s);
for(int i=0;i<2;i++){
a[i]=scan.nextInt();
}
System.out.print(max(a[0],a[1]));
}
public static int max(int a, int b){
int big;
if(a>b){
big = a;
}else{
big = b;
}
return big;
}
} |