public class Demo17 {
public static void main(String[] args) {
int[] arr={90,1562,43,2,44,8,6666,8888};
int max=arr[0];
for(int i=1;i<arr.length;i++){
if(arr[i]>max){
max=arr[i];
}
}
System.out.println(max);
}
}
Java代码
![](https://img-home.csdnimg.cn/images/20240711042549.png)