Null pointer exception in custom input

input
5
1
2
2
2
3

output
Exception in thread “main” java.lang.NullPointerException
at HashTable.highestFreq(HashTable.java:178)
at HashTable.main(HashTable.java:199)

Problem is in your HashTable , if inbuilt HashMap is used then correct o/p is coming .

what is the problem in hashtable?