Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By JosAH

Thread: How does HashMap differ from HashTable?

  1. #1
    guest_user is offline Member
    Join Date
    May 2011
    Posts
    47
    Rep Power
    0

    Default How does HashMap differ from HashTable?

    What are each of their strengths and weakness which the other lack,( i.e. Which one is better for what purposes?)

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,513
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by guest_user View Post
    What are each of their strengths and weakness which the other lack,( i.e. Which one is better for what purposes?)
    HashTables are to HashMaps as Vectors are to ArrayLists, i.e. HashTables are synchronized while HashMaps are not. If you don't need synchronization use a HashMap, it's a bit faster.

    kind regards,

    Jos
    JeffGrigg likes this.
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. HashTable vs HashMap
    By bugger in forum New To Java
    Replies: 7
    Last Post: 01-06-2011, 03:15 PM
  2. we use the differ[1:ProcessBean,2:DTO], usage/reusage always?
    By lse123 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 01-21-2010, 07:15 PM
  3. Replies: 7
    Last Post: 12-08-2009, 07:17 PM
  4. How does the several 'development kit's ' differ?
    By javaamateur in forum New To Java
    Replies: 3
    Last Post: 10-09-2009, 01:46 PM
  5. Outcome differ from Netbeans and Java Web Start
    By bongia in forum New To Java
    Replies: 1
    Last Post: 11-06-2007, 01:35 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
  •