Welcome to the Ranch!
What you are refering to is an array literal, and the first one is not a valid form of it because array literal works only when you are declaring a variable of array type.
Where you also might find array literal useful is when, for example, you want to pass an array to a method, but don't want to assign it to a specific variable since that's the only place you need it:
JLS probably contains some more detailed information on the topic, but this is basically it.
Also, this is not a characteristic of
Java 7, since array literals were introduced a long time ago.