471,887 Members | 828 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 1563
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
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.