my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android forum!
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
Similar Threads
is this two are euqal
Array Reference Assignments
how to set pos of a frame
Comparable again