I noticed one could write code like this, which is perfectly normal, by the way:
int arrays[] = {1, 2, 3}; for (int n : arrays) System.out.println(n);
You need this syntax:
for(int n : new int[]{1, 2, 3}) System.out.println(n);