Results 1 to 2 of 2
  1. #1
    kovalensue is offline Member
    Join Date
    Nov 2010
    Rep Power

    Default A little trouble with Lists....

    Hi guys and ladies, ive got a little problem...i am creating a simple text game...i have a class Thing, then i have class Room(rooms in game, example office, coridor,...) this class i have ArrayList filled by objects of Thing class....and now i create class Inventory and there is another ArrayList and now i dont know how to take things from firs list and put them to second(from rooms to inventory)....does anybody know how to solve this??

  2. #2
    java_newby is offline Member
    Join Date
    Dec 2010
    Rep Power


    maybe you could look at java API because there are methods get and add. do you want to move everything from array 1 to array 2? because if it is just some things maybe you could use something along the lines of array2.add(array1.get())

Similar Threads

  1. Help with lists
    By datreta in forum New To Java
    Replies: 6
    Last Post: 10-29-2010, 11:33 AM
  2. Linked Lists
    By vendetta in forum New To Java
    Replies: 6
    Last Post: 01-26-2010, 08:23 AM
  3. comparision between two lists
    By suprabha in forum Advanced Java
    Replies: 14
    Last Post: 08-01-2008, 02:49 PM
  4. 2 dimensional Lists
    By gapper in forum New To Java
    Replies: 4
    Last Post: 01-20-2008, 09:01 AM
  5. Tudu Lists 2.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-11-2007, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts