Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Spreadsheet data - linked list or hashmap

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Spreadsheet data - linked list or hashmap

    Hi,

    I am looking to implement a spreadsheet in java. Would it be better to use a linked list (rows) of linked list of cells (columns) to store the data or a hashmap (each cell maps to a key e.g. A1 -> 1, A2-> 2 etc.)?

    Or is there an even better data structure to use?

    Thanks!


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Spreadsheet data - linked list or hashmap

    Depends on what you're looking to optimize for. Using a plain array/ArrayList could also be an option.

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    19
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Spreadsheet data - linked list or hashmap

    What about LinkedHashMap?

Similar Threads

  1. linked list help
    By tjoney in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 3rd, 2011, 06:54 PM
  2. [SOLVED] Linked List Help
    By lieles in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 4th, 2011, 10:32 PM
  3. Help with linked list
    By joecool594 in forum Collections and Generics
    Replies: 3
    Last Post: November 28th, 2010, 12:33 PM
  4. Simple linked list
    By Koren3 in forum Collections and Generics
    Replies: 10
    Last Post: November 2nd, 2009, 03:33 AM
  5. Recursive function based on Linked list
    By rosh72851 in forum Collections and Generics
    Replies: 1
    Last Post: March 9th, 2009, 06:23 PM