I have recently been thinking about the difference between the two ways of defining an array:
int[] array
int array[]
Is there a difference?
I have recently been thinking about the difference between the two ways of defining an array:
int[] array
int array[]
Is there a difference?
They are the same, but there is an important difference between these statements:
in 1. regular is just an int, as opposed to 2. where both regular and array are arrays of int's.
The second statement you have is therefore preferred, since it is more clear. The first form is also discouraged according to this tutorial on Oracle.