aspose file tools*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 38398
    
  23
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: 30352
    
150

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: 38398
    
  23
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: 38398
    
  23
It wasn't me said it, it was Joe Ess, but yes, he said it was the JVM.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Frequent use of HashTable class. Why?