I have a HashMap defined like this...
HashMap uniqueNames = new HashMap();
It stor
If you only want the value you can go for this. In this example I had to get the maximum frequency of a number among an array of 'n' numbers
{
int n = sc.nextInt();
int arr[] = new int[n];
int freq = 1;
int i;
Map myMap = new HashMap();
for(i=0;imax)
max = myMap.get(arr[i]);
}
System.out.println(max);
}