Java program that computes different types of hash functions