If we do int[] b = {2, 4}; then we have an array called b, with length 2. From what I understand, the java compiler is implicity doing int[] b = new int[] {2, 4}; for me, fine.
Similarly, if we do int[] c = new int[2]; , then we get an array called c initialzed to {0, 0} My confusion comes from why the following doesn't work:
Why can't I do int[] d = new int[2] {5, 6};