所以这里我有一个用于输入的循环系统。 基本上我希望它在进入下一步之前循环 5 次 但它说“我可能是 1”和“索引 1 超出长度 1 的范围”
System.out.println ("Enter the 5 event names for teams ");
for (int i=0; i < 5; i++) {
System.out.println("Enter Name of the events that the teams are entering");
Tevent[i] = scan.next(); // problem here . it is saying that " Index 1 out of bounds for length 1
}