Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29875

Re: difference between hashtable and hashMap ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: difference between hashtable and hashMap ?
Date Sat, 30 Aug 2014 16:39:48 -0400
Organization A noiseless patient Spider
Lines 24
Sender esosman@24.91.39.204
Message-ID <lttcqr$1l4$1@dont-email.me> (permalink)
References <a32f3a08-49ca-48dc-88c6-1b58aacbf1e5@googlegroups.com> <MPG.2e6bdce2b6dd821989686@news.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Sat, 30 Aug 2014 20:39:56 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="1700"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dTBYPR7IPVZik/Ypn1wwm"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0
In-Reply-To <MPG.2e6bdce2b6dd821989686@news.aioe.org>
Cancel-Lock sha1:8bB/HhHf3MS3VV7Azta21i5gib4=
Xref csiph.com comp.lang.java.programmer:29875

Show key headers only | View raw


On 8/30/2014 8:07 AM, Brixomatic wrote:
> In article <a32f3a08-49ca-48dc-88c6-1b58aacbf1e5@googlegroups.com>,
> Rishipal Singh (95rishipal@gmail.com) says...
>>
>> what is difference between hashtable and hashMap ;
>>   please explain with examples
>
> The HashTable is synchronized (not including the iterator), which is not
> needed usually.

     It's "Hashtable", not "HashTable" (I made the same mistake, so
I can sympathize ...)

>[...]
> The major advantage of java.util.HashTable to java.util.HashMap is that
> you can have a custom load factor with the HashTable, which might help
> you in improving the behavior in cases where you need to sacrifice some
> speed in favor of space.

     Um, er, why do you think HashMap's load factor can't be customized?
Is the HashMap(int,float) constructor lying to us?

-- 
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

difference between hashtable and hashMap ? Rishipal Singh <95rishipal@gmail.com> - 2014-08-23 23:03 -0700
  Re: difference between hashtable and hashMap ? Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-08-24 08:09 +0000
  Re: difference between hashtable and hashMap ? Josip Almasi <joe@vrspace.org> - 2014-08-24 11:41 +0200
  Re: difference between hashtable and hashMap ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-24 08:13 -0400
    Re: difference between hashtable and hashMap ? Arne Vajhøj <arne@vajhoej.dk> - 2014-08-24 08:48 -0400
      Re: difference between hashtable and hashMap ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-24 09:28 -0400
        Re: difference between hashtable and hashMap ? Arne Vajhøj <arne@vajhoej.dk> - 2014-08-24 14:31 -0400
          Re: difference between hashtable and hashMap ? Roedy Green <see_website@mindprod.com.invalid> - 2014-08-24 22:35 -0700
            Re: difference between hashtable and hashMap ? Arne Vajhøj <arne@vajhoej.dk> - 2014-08-25 20:41 -0400
            Re: difference between hashtable and hashMap ? Jeff Higgins <jeff@invalid.invalid> - 2014-08-26 04:21 -0400
          Re: difference between hashtable and hashMap ? "Qu0ll" <Qu0llSixFour@gmail.com> - 2014-08-31 10:27 +1000
            Re: difference between hashtable and hashMap ? Arne Vajhøj <arne@vajhoej.dk> - 2014-09-07 22:10 -0400
              Re: difference between hashtable and hashMap ? "Qu0ll" <Qu0llSixFour@gmail.com> - 2014-09-08 13:41 +1000
  Re: difference between hashtable and hashMap ? Arne Vajhøj <arne@vajhoej.dk> - 2014-08-24 08:52 -0400
    OT: Re: difference between hashtable and hashMap ? Wayne <nospam@all.invalid> - 2014-08-24 18:04 -0400
  Re: difference between hashtable and hashMap ? Roedy Green <see_website@mindprod.com.invalid> - 2014-08-24 22:36 -0700
  Re: difference between hashtable and hashMap ? Brixomatic <brixomatic@yahoo.com> - 2014-08-30 14:07 +0200
    Re: difference between hashtable and hashMap ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-30 16:39 -0400
      Re: difference between hashtable and hashMap ? Brixomatic <brixomatic@yahoo.com> - 2014-08-31 09:42 +0200

csiph-web