Possible Duplicate:
Difference between int[] array and int array[]
Is int[] arr;
functionally the same as int arr[];
?
Yes. You can put the braces in either place when declaring an array.
Bonus: you can even put 'em here:
int []arr
Yes, the functionality is the same. You can have the braces anywhere.
int[] a,b,c[];
is equivalent to
int a[],b[],c[][];
It's just the matter of style. You can pick the style you like. They perform exactly the same. Some claim that if you write "int[] array", it will be clearer that it's an array of integer rather than writing "int array[]".
It is, it's just to appease C++ developers they include int arr[]. (Or at least what I told in school)
Yes it's the same. int[] arr is more convenient though.
精彩评论