Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Frequent use of HashTable class. Why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Frequent use of HashTable class. Why?" Watch "Frequent use of HashTable class. Why?" New topic
Author

Frequent use of HashTable class. Why?

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37958
    
  22
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: 30085
    
149

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: 37958
    
  22
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.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37958
    
  22
It wasn't me said it, it was Joe Ess, but yes, he said it was the JVM.
 
wood burning stoves
 
subject: Frequent use of HashTable class. Why?
 
Similar Threads
why t is small in Hashtable class of java
Abstract class & Interface
Free website/portal
Axis and JAX-RPC
3 Dimensional Hash Table