I was updating a legacy code base in Java and I found a line like this:
Object arg[] = { new Integer(20), new Integer(22) };
That line catc
Another good reason to write Integer[] ints instead of Integer ints[] is because of inheritance relations: Integer[] is subtype of Number[] is subtype of Object[].
In other words, you can put Integers in an Object array, so you can think of the [] as part of the object's type definition -- which is why it makes sense to have it close to the type instead of the object name.