A simple java program to eliminate duplicates