package com.scanner.shuzu;
public class Demo03 {
public static void main(String[] args) {
int[] arrays ={0,1,2,3,4,5};
int sum =0;
for (int i = 0; i < arrays.length; i++) {
sum = sum + arrays[i];
}
System.out.println(“sum=”+sum);
int max = arrays[0];
for (int i= 0; i <arrays.length; i++) {
if (arrays[i]>max){
max = arrays[i];
}
}
System.out.println(“max=”+max);
}
}