运行后系统提示Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
at Methods.max(Onerload.java:32)
at Onerload.main(Onerload.java:6)
28行定义的数组只有两个位置
你的30,31,32却塞了三个数字给他,当然报错
你要把28行定义的数组容量扩大成三个