Java Array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
2 Answers
+ 3
I think prepending the brackets is good practice
28th Dec 2017, 10:59 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 1
it's the same but common practise is int[] myArray.
28th Dec 2017, 10:44 PM
thex
thex - avatar