import java.util.Arrays;
public class T {
public static void main(String[] args) {
System.out.println(T.sort(21, 13, 2));
}
public static int sort(int n1,int n2,int n3){
int arr[] = {n1,n2,n3};
// 数组工具类,sort()方法是自动升序排序
Arrays.sort(arr);
return arr[2];
}
}
// 控制台
21
public int max(int a,int b,int c){
int max=a;
if (a<=b){
max=b;
}else if(a<=c){
max=c;
}
return max;
}