Your {2, 3} is an example of an ArrayInitializer. According to the JLS:
10.6. Array Initializers
"An array initializer may be specified in a declaration (§8.3, §9.3, §14.4), or as part of an array creation expression (§15.10), to create an array and provide some initial values."
The first three cases are for declaring variables, and that's not what you are doing. The final case corresponds to what you are trying to do ... create an array instance ... but if you look at the linked section you will see that you need to use the Java new keyword to do this.
So why does the Java syntax not allow you to do this ( myAL.add({2,3}); )?
Well, I think that the primary reason is that {2, 3} is not sufficient to say what type of array should be created ... in all such contexts.
Consider this:
ArrayList myAL = new ArrayList(); myAL.add({2,3});
What kind of array is appropriate here? Should it be an int[]? Or a long[]? Or Integer[]? Or Object[]?
The other thing to remember is that array initializers were part of the Java language in Java 1.0 ... well before the Java language included generic types and limited type inferencing that might (hypothetically) allow the ambiguity to be resolved in a sensible fashion.
ArrayListat all, it's just a syntax error.