Exception in thread “main“ java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for lengt时间:2024-05-18 15:41:13 项目场景: IntelliJ IDEA 问题描述: 控制台报错:Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5 at HelloWorld.main(HelloWorld.java:14) 原因分析: 数组下标溢出 解决方案: 将下标改为数组定义的个数之内