File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes about array Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "about array " Watch "about array " New topic
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.)
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: about array
 
Similar Threads
Doubt
How could I print names randomly?
WA #1.....word association
Another 'Y' game
Printing the index of an array