HashMap

A hash table is a data structure that maps keys to values for highly efficient lookup.

A simple Java example of working with a hash map

public HashMap<Integer, Student> buildMap(Student[] students) {
    Map<Integer, Student> map = new HashMap<Integer, Student>();
    for (Student s : students) {
        map.put(s.getId(), s);
        return map;
    }
}