What is the difference between a Hashtable and Properties?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Propertiesis a very specialized class that’s designed to hold configuration and/or resources that are usually stored in some file.It has several features that
Hashtabledoesn’t have (and shouldn’t have):load()/store())loadFromXML()/storeToXML())Propertiesinstance at construction time.Stringkeys and values. While it is technically aMap<Object,Object>actually storing non-Stringkeys or values is strongly discouraged and unsupported.A
Hashtableon the other hand is a general-purposeMapimplementation (which is mostly replaced by theHashMap, however).