The following line of code compiles. Java allows this shortcut.
int[] az = {1,2,3,4,5};
But the following does not compile, why?
int[] ay;
ay = {1,2,3,4,5};
The following line of code compiles. Java allows this shortcut.
int[] az = {1,2,3,4,5};
But the following does not compile, why?
int[] ay;
ay = {1,2,3,4,5};