Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By Fubarable

Thread: Hashmap questions

  1. #1
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    11

    Default Hashmap questions

    Why are hashmaps useful?
    In what kind of situations should I use them?
    And how do I use hashmaps correctly?

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

    Default Re: Hashmap questions

    There's already much written on this that can easily be gleaned from the internet which makes me ask:

    What are your answers based on what you've read and what are your specific points of confusion?
    What's the underlying reason for these questions?
    Last edited by Fubarable; 01-22-2012 at 08:47 PM.

  3. #3
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    11

    Default Re: Hashmap questions

    Quote Originally Posted by Fubarable View Post
    What's the underlying reason for these questions?
    I was just wondering, someone said in their blog that they told someone how to use hashmaps.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,309
    Blog Entries
    1
    Rep Power
    32

    Default Re: Hashmap questions

    You use them if you want a collection where you want to access an object (the value) based another object (the key). For instance if you want to get a test score (the value) that is tied to a Student (the key). HashMaps are usually very quick and efficient at retrieving things.

    To use them correctly you'd read the API and check out tutorials. Otherwise that's a very vague and broad question.
    PhQ likes this.

Similar Threads

  1. Help with HashMap
    By d0nmin0 in forum Advanced Java
    Replies: 8
    Last Post: 08-15-2011, 01:25 AM
  2. final HashMap hm=new HashMap();
    By sangramkeshari.jena in forum New To Java
    Replies: 4
    Last Post: 07-21-2011, 09:44 PM
  3. hashmap questions =P
    By santa in forum New To Java
    Replies: 3
    Last Post: 05-31-2011, 01:06 PM
  4. Hashmap to TXT and TXT to Hashmap
    By elvinny in forum Advanced Java
    Replies: 4
    Last Post: 02-16-2011, 11:12 PM
  5. Replies: 7
    Last Post: 12-08-2009, 07:17 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
  •