I'm trying to understand why my code causes an ArrayIndexOutOfBoundsException. Can someone explain it to me?
public class Test {
final static int x[] = new int[5];
public static void main(String[] args) {
final int x = new Test().x[5];
if (x <= 10)
System.out.println("javachamp");
}
}