hashtable classes and hashMap help! [duplicate]


I must implement a system for viewing and updating student data. At the beginning the system must load the data of the file students.txt and show the following menu:

  • See data
  • Search Student
  • Exit
  • To carry out this project, what is the most advisable to use: Hashtable or HashMap ?

    asked by Melina TA 07.08.2016 в 05:42

    1 answer


    Depends on several factors, do you need the objects to be synchronized? Will you not allow values in null? Do you care about the order?

    For what you mention, it is a simple application, I recommend you then use HashMap . It will be faster and I do not think you need as many properties as you have HashTable , anyway I leave a link where it explains very well the operation of HashTable link

    answered by 14.08.2016 в 23:58