Results 1 to 2 of 2
  1. #1
    JG4m3r is offline Member
    Join Date
    Mar 2012
    Rep Power

    Question Reading value from two-dimensional ArrayList

    Hi guys, so I'm just wondering how I can read a value from a two dimensional ArrayList, because simply writing int i = randomArrayList.get(0,0); returns an error.

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Richmond, Virginia
    Blog Entries
    Rep Power

    Default Re: Reading value from two-dimensional ArrayList

    A two dimensional array list is actually a one dimensional array list where each element is itself an ArrayList. Check the API for the get method and how it works, also, consider how you would index a 2d array (it's similar, but not identical).

Similar Threads

  1. Reading from txt file to arraylist
    By artur in forum New To Java
    Replies: 4
    Last Post: 02-10-2012, 04:51 AM
  2. Replies: 7
    Last Post: 09-26-2011, 11:29 PM
  3. reading two dimensional array
    By fr0s1yjack in forum New To Java
    Replies: 18
    Last Post: 06-23-2011, 03:16 PM
  4. Replies: 5
    Last Post: 03-12-2011, 01:04 AM
  5. Reading API for ArrayList
    By kian_hong2000 in forum New To Java
    Replies: 10
    Last Post: 08-22-2008, 06:09 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