I'm trying to scan the array inside the loop, as per the code below:
import java.util.Scanner;
public class RapidoPora {
public static void main(String[] args) {
int[] nota = new int[10];
for(int c = 0; c < 11; c++) {
System.out.println(nota[c]);
}
}
}
But this exception occurs:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10 at RapidoPora.main(RapidoPora.java:15) 0 0 0 0 0 0 0 0 0 0
What can it be?