| Author |
about array
|
Albert Lee
Greenhorn
Joined: Aug 04, 2002
Posts: 18
|
|
|
are "array[][] a;" and "array[] a[];" eqivalent?
|
Everyday create your history.
|
 |
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
|
|
According to JLS 10.2 Array Variables, they are. Just make sure that the "array" type is defined somewhere
|
SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
|
 |
Bert Bates
author
Sheriff
Joined: Oct 14, 2002
Posts: 8712
|
|
Albert - Yes - they are the same... and from a style perspective: int [ ] x; and int [ ] [ ] x; are preferred over: int x [ ]; or int x [ ] [ ]; which is certainly preferred over the legal but ugly: int [ ] x [ ]; The reason is trying reading them out loud, from left to right.
|
Eliminate fossil fuel subsidies. (If you're not on the edge, you're taking up too much room.)
|
 |
 |
|
|
subject: about array
|
|
|