I’ve been told that
int[] numbers
and
int numbers[]
are equivalent. I’ve only ever seen the former though. What impetus is there, if ever, to write the latter?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Doesnt really matter, but, my personal preference is for
int[] numbersas it more logically follows theclass instance_namepattern.After all you are really delcaring an “array of integers” called “numbers”, the second form is slightly misleading as its more of declaring “an integer” called “numbers” oh and by the way its actually an array of “numbers”.