Results 1 to 5 of 5
  1. #1
    dinosoep is offline Senior Member
    Join Date
    Nov 2009
    Posts
    150
    Rep Power
    5

    Default dynamic two dimensional arrays?

    here is the deal: I want(have to) parse things from an xml file into a two dimensional array.
    but I don't the length the array has to be.
    is there some kind of an arraylist but for two demensional arrays?

  2. #2
    sky
    sky is offline Member
    Join Date
    Nov 2009
    Posts
    96
    Rep Power
    0

    Default

    You should be able to make an ArrayList of ArrayLists.

  3. #3
    dinosoep is offline Senior Member
    Join Date
    Nov 2009
    Posts
    150
    Rep Power
    5

    Default

    thanks, gonna try it

  4. #4
    dinosoep is offline Senior Member
    Join Date
    Nov 2009
    Posts
    150
    Rep Power
    5

    Default

    It works and it is fast.
    but it looks a bit ugly :p isn't there something cleaner?

  5. #5
    sky
    sky is offline Member
    Join Date
    Nov 2009
    Posts
    96
    Rep Power
    0

    Default

    I didn't find anything. Something cleaner would be to make your own class that handles dynamic matrices, but maybe somebody knows another thing.
    Last edited by sky; 12-05-2009 at 10:39 PM.

Similar Threads

  1. Multi-dimensional arrays
    By Implode in forum New To Java
    Replies: 1
    Last Post: 09-15-2009, 09:50 AM
  2. [SOLVED] Multi-dimensional arrays
    By thelinuxguy in forum Advanced Java
    Replies: 3
    Last Post: 05-07-2009, 03:52 PM
  3. two-dimensional array
    By kHim in forum New To Java
    Replies: 4
    Last Post: 11-16-2008, 08:21 PM
  4. How to reverse two dimensional
    By masaka in forum New To Java
    Replies: 4
    Last Post: 05-19-2008, 11:02 AM
  5. Replies: 2
    Last Post: 01-07-2008, 08:45 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
  •