There is no difference between them as they both declare a variable of type "array of ints". There is no "Java way" (but a preferred way), even if the documentation, arrays are declared with brackets before the variable name :
int[] array1;
Note : Pay attention that "declaration" is not "initialisation" (or instanciation)
int[] array1; // declares an array of int named "array1"
// at this point, "array1" is NOT an array, but null
// Thus we "declare" a variable that will hold some
// data of type int[].
array1 = new int[] {1, 2, 3}; // legacy initialization; set an array of int
// with 3 values to "array1". Thus, we "initialize"
// the variable with some data of type int[]
Therefore,
int [] array1;
int array2[];
both declares two variables of type int[]
; however, they are just declarations of data types, and not arrays yet. And like Oscar Gomez said, the difference now is that the second "way" requires you to specify that the variable is of type array, and not only an int.
int i[], j; // i is a data type array of int, while j is only an int
int [] k, l; // both k and l are of the same type: array of int