File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes defining arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "defining arrays" Watch "defining arrays" New topic

defining arrays

javi cervera

Joined: Jan 17, 2002
Posts: 16
I don�t know how can i define multi dimensional array and fill in the same line:
int a[] = new int [] {2,3}; // ok one dimension
but with two dimensions ??

Thanks in advanced
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
Here is an example from Bruce Eckel (Thinking in
Java) Book:
int[][] a1 = {
{ 1, 2, 3, },
{ 4, 5, 6, },
I agree. Here's the link:
subject: defining arrays
It's not a secret anymore!