public class lianxi{ public static void main(String[] args){ int[] arr = new int[]{11,22,55,88,44,99}; int a=0; for(int i=0;i<arr.length-1;i++){ if(arr[i]>=a){ a=arr[i]; } } System.out.println("最大值为"+a); }}