+ 1

Java Array

Does it matter where the bracket goes after or before the name of the array? For example, int myArray[] and int []myArray. Are they the same?

28th Dec 2017, 10:42 PM
Khanh Dao
Khanh Dao - avatar
3 Answers
+ 3
I think prepending the brackets is good practice
28th Dec 2017, 10:59 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
it's the same but common practise is int[] myArray.
28th Dec 2017, 10:44 PM
thex
thex - avatar