aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "defining arrays" Watch "defining arrays" New topic
Author

defining arrays

javi cervera
Greenhorn

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, },
};
Thanks
Barkat
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: defining arrays
 
Similar Threads
Array Reference Assignments
parameters/arguments
how to set pos of a frame
is this two are euqal
Comparable again