I was updating a legacy ode base in Java and I found a line like this:
Object arg[] = { new Integer(20), new Integer(22) };
That line catch my attention because I am used to this kind of code:
Object[] arg = { new Integer(20), new Integer(22) };
The content of the array isn't important here. I'm curious about the brackets next to the variable name versus the brackets next to the class name. I tried in Eclipse (with Java 5) and both lines are valid for the compiler.
Is there any difference between those declarations?