Results 1 to 3 of 3
  1. #1
    rp181 is offline Member
    Join Date
    Mar 2009
    Posts
    70
    Rep Power
    0

    Default ArrayList vs LinkedList

    What's the difference? I am used to using the LinkedList type, but AP CS extensively uses ArrayList.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    They are both lists but optimized for different situations. LinkedList is optimized for getting information sequentially while an ArrayList is better at getting information by index (anyone -- please correct if wrong).

    Please look here: http://onjava.com/pub/a/onjava/2001/...imization.html
    Last edited by Fubarable; 02-27-2011 at 02:05 AM.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

Similar Threads

  1. Replies: 7
    Last Post: 11-22-2010, 01:26 PM
  2. LinkedList help
    By jigglywiggly in forum New To Java
    Replies: 6
    Last Post: 09-19-2009, 07:24 AM
  3. Replies: 2
    Last Post: 04-21-2008, 11:43 AM
  4. Replies: 0
    Last Post: 12-05-2007, 02:09 PM
  5. how to use LinkedList
    By fred in forum Advanced Java
    Replies: 1
    Last Post: 07-24-2007, 01:52 AM

Posting Permissions

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