This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes two dimension array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "two dimension array " Watch "two dimension array " New topic

two dimension array

vijayapriya thirumurugan

Joined: Apr 03, 2009
Posts: 16

hello sir,

i have two dimension. i want to store elements which are of arraylist format. that is each element in the two dimension are arraylist. i'm waiting..
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44545
Not a good idea to try putting generic classes into arrays.

It is however easy enough to create a List<List><Foo>> or even a List<List><List><Foo>>>.

By the way: There is no such thing as a 2-D array in Java. Only an array of arrays.
I agree. Here's the link:
subject: two dimension array
It's not a secret anymore!