0

Possible Duplicate:
Why is the ‘t’ in Hash Table(Hashtable) in Java not capitalized

Why java.util.Hashtable not follow java naming convention ? here 't' is lowercase, if it follow the class name would be HashTable...

Community
  • 1
  • 1
raj
  • 387
  • 2
  • 9

3 Answers3

0
java.util.HashMap;
java.util.HashSet;
java.util.Hashtable

Because Map and Set are the Interfaces which come under Collection Framework, but table is not a keyword in current version. So camelcase is not used.

subZero
  • 307
  • 1
  • 9
0

Hashtable was created in Java v1 not like other which were released in Java2.

Prabhath kesav
  • 428
  • 3
  • 6
  • 21
-1

See this question:

Why is the 't' in Hash Table(Hashtable) in Java not capitalized

Hashtable was created in Java v1. The consistent naming conventions for collections were established later, in Java2, when the other classes were published as part of the brand new Java Collection Framework.

Which btw made Hashtable obsolete, so it should not be used in new code.

Hope that helps.

Community
  • 1
  • 1
RKumsher
  • 2,787
  • 2
  • 14
  • 11
  • Sorry, am not fully satisfied upon this answer... Java's naming conventions are not a new one...By just capitalize the letter 't' what cause problem to java developers? – raj Oct 19 '12 at 11:58
  • It is a new one. Java2 is considered new, compared to the older ones. Capitalizing the letter would prohibit reusing old sources. And, as @RKushmer quoted, Hashtable is obsolete. Should not be used for new designs. – ppeterka Oct 19 '12 at 12:33