#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    HashMap and LinkedList help


    TestClass.java
    pastebin com /Hwg9PVzA

    Word.java

    pastebin com /hwrrvMbA

    i'm trying to create a hashmap that will have a string as a key and have a linkedlist of Word objects. i'm trying to add to that linkedlist and also access the methods of that object.


    Please Help
  2. #2
  3. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Feb 2004
    Location
    Mobile, Alabama
    Posts
    4,023
    Rep Power
    1285
    Originally Posted by labrattlabz2
    TestClass.java
    pastebin com /Hwg9PVzA

    Word.java

    pastebin com /hwrrvMbA

    i'm trying to create a hashmap that will have a string as a key and have a linkedlist of Word objects. i'm trying to add to that linkedlist and also access the methods of that object.


    Please Help
    Accessing the list will be like accessing any object.

    You use the .get method on the list, and type of what you retrieve will be an ArrayList. You can then call add or get on it.

IMN logo majestic logo threadwatch logo seochat tools logo