Arka Guhathakurta wrote:HashSet is a Set and Hashtable is a Map. You have to read Set and Map interfaces to know the difference. You use Comparable's compareTo method to compare two objects of a class. That basically menas that implementing a comparable interface will make your class to be used to calculate HashCode. However comparator can be used to compare one or more objects. Array is a contiguous collection of similar data-types (generally) whereas collection is a type safe arrangement of objects. Collections framework will tell more. Please correct me if I am wrong.
A small adding for what Arka said A Set is a collection that has no duplicate elements. A map is a way of storing key/value pairs. The way of storing a Map is similar to two-column table and for detailed information see
java documentation