java 最大值和最小值
/*
int[] arr={20,63,2,56,89,10,2,89};
int max =arr[0];
int min =arr[0];
for (int i = 1;i<arr.length;i++){
if (arr[i]>max){
max=arr[i];
}
if (arr[i]<min){
min=arr[i];
}
}
System.out.println("max="+max);
System.out.println("min="+min);
/*
int[] arr={20,63,2,56,89,10,2,89};
int max =arr[0];
int min =arr[0];
for (int i = 1;i<arr.length;i++){
if (arr[i]>max){
max=arr[i];
}
if (arr[i]<min){
min=arr[i];
}
}
System.out.println("max="+max);
System.out.println("min="+min);