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 2 of 2

Thread: private Map<String, ArrayList> xlist = new HashMap<String, ArrayList>();

  1. #1
    Member Scotty's Avatar
    Join Date
    Oct 2010
    Posts
    60
    My Mood
    Scared
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default private Map<String, ArrayList> xlist = new HashMap<String, ArrayList>();

    xlist.put(var1, new <Node>ArrayList(Attended));

    How do I stop the unchecked error on this?

    also on

    xlist.put((String)var1, new <Node>ArrayList(Attended));

    it is on the put.

    ty
    Last edited by Scotty; March 20th, 2011 at 09:14 AM.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: private Map<String, ArrayList> xlist = new HashMap<String, ArrayList>();

    If you want help with code, you should provide an SSCCE that we can copy and paste to see the errors you mentioned.

    Until then, I'd recommend you read through this: Lesson: Generics (The Java™ Tutorials > Learning the Java Language)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. ArrayList to String/outOfBounds
    By Scotty in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 28th, 2011, 04:41 PM
  2. hashmap & arraylist mapping
    By abhi178 in forum Collections and Generics
    Replies: 3
    Last Post: November 29th, 2010, 07:32 AM
  3. ArrayList<String> convert to lowercase
    By s_mehdi76 in forum Collections and Generics
    Replies: 1
    Last Post: October 30th, 2010, 09:05 PM
  4. Searching and printing string results from an Arraylist. Having difficulty.
    By Espressoul in forum Loops & Control Statements
    Replies: 1
    Last Post: February 25th, 2010, 08:32 PM
  5. Convert string to private and public key
    By Ganezan in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: January 5th, 2010, 08:37 AM