jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Multidimentioanl Array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Multidimentioanl Array" Watch "Multidimentioanl Array" New topic

Multidimentioanl Array

Ramesh Shanmugam
Ranch Hand

Joined: Sep 13, 2004
Posts: 132
Does Really Java Support Multidimentional Array.
If not then How it handles Multi dimentional Array.


Ramesh Shanmugam - SCJP 1.5
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
In Java, a two dimensional array is a one dimensional array of references to one dimensional arrays. As a result, each row can be a different length.
[ November 17, 2004: Message edited by: Mike Gershman ]

Mike Gershman
SCJP 1.4, SCWCD in process
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
It's cool how you can take a multi-dimensional array apart.

Since gameBoard is an array of arrays, I can pull out one of those arrays, work with it, replace it, etc. I put back a new row with a different length. That may make the game very hard to play I've seen some people call this a "non-rectangular" array.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link: http://aspose.com/file-tools
subject: Multidimentioanl Array
It's not a secret anymore!