| Author |
Differnce between array declaration
|
Phillipe Rodrigues
Ranch Hand
Joined: Oct 30, 2007
Posts: 165
|
|
What is the basic difference between the below(1),(2)declarations? int[] var;............................(1) int var[];.............................(2)
|
Thanks,
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 10043
|
|
|
the first one is perferred by most people, but otherwise, there isn't a difference.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
|
|
|
According to somewhere on the Sun site int[] array is preferred because it makes it clear that the type of the variable is an array.
|
 |
 |
|
|
subject: Differnce between array declaration
|
|
|