| Author |
Frequent use of HashTable class. Why?
|
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
On this recent thread, Joe Ess said that HashTable was the 2nd most frequently used class, after String. Does anybody know why HashTable is used so frequently? Joe said it was used by the JVM for mapping purposes.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26141
|
|
Originally posted by Campbell Ritchie: Does anybody know why HashTable is used so frequently? Joe said it was used by the JVM for mapping purposes.
I've noticed HashTable showing up a lot in the profiler too even though we don't have ANY references to it in our code. Joe's explanation makes sense. Newer code would mostly use HashMap rather than HashTable. But the JVM was written before HashMap was invented.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
|
Thank you very much.
|
 |
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
Originally posted by Campbell Ritchie: Joe said it was used by the JVM for mapping purposes.
Really by the JVM, or do you mean the Java API classes?
|
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
|
It wasn't me said it, it was Joe Ess, but yes, he said it was the JVM.
|
 |
 |
|
|
subject: Frequent use of HashTable class. Why?
|
|
|