Everything in Java seems to follow capitalization rules except for Hashtable.
Hashtable<String, String> ht = new Hashtable<String, String>();
as opposed to
ArrayList<String> a = new ArrayList<String>();
or
HashMap<String,Integer> a = new HashMap<String,Integer>();
Why is this ? Is Hash Table read as just one word (Hashtable) ?
Hashtablewas 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
Hashtableobsolete, so it should not be used in new code.Hope that helps.