public class test1 { public static void main(String[] args) { int[] arr={99,25,34,48,63,78,101,71,12}; int max=arr[0]; for (int i=0;i<arr.length;i++){ if (arr[i]>max) { max = arr[i]; } } System.out.println("数组arr中的最大值为max= "+max); } }标签:arr,遍历,JAVA,int,max,最大值,数组,public From: https://www.cnblogs.com/smartlearn/p/16704392.html