469,271 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Merging arrays or returning multiple arrays

I think I've been working on this assignment for too long and my brain has stopped making connections!

Basically, we are making a very simple version of AutoCAD, called HomeCAD. The problem I am having is this:
Each House object contains an ArrayList of Storeys. Each Storey within the ArrayList contains a HashMap of Rooms. We are required to have a method that will return an array of all the Rooms within the house. Converting the HashMap to an array is easy enough, and I've done that, however I seem to be stuck on how to actually put all of the returned arrays from all of the Storeys together.

There's little point in me posting my code for this, seeing as it is so jumbled.
Sep 8 '08 #1
1 1484
11,448 Expert 8TB
Read the API documentation of the Collection class and the ArrayList classes.
It implements the addAll() method which you want to use.

kind regards,

Sep 8 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Gent | last post: by
4 posts views Thread by Bush will disarm all workers next | last post: by
7 posts views Thread by Jon Vaughan | last post: by
8 posts views Thread by vidishasharma | last post: by
8 posts views Thread by jodleren | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.