can anyone please help..
what am i doing wrrong.
package com.codegym.task.task08.task0815;
import java.util.HashMap;
import java.util.HashSet;
import java.util.*;
/*
Census
*/
public class Solution {
public static HashMap<String, String> createMap() {
//write your code here
HashMap<String, String> map = new HashMap<String, String>();
map.put("a", "b");
map.put("q", "c");
map.put("r", "d");
map.put("e", "f");
map.put("g", "f");
map.put("h", "f");
map.put("i", "j");
map.put("l", "k");
map.put("m", "n");
map.put("p", "o");
return map;
}
public static int getSameFirstNameCount(HashMap<String, String> map, String name) {
//write your code here
int count=0;
for(HashMap.Entry<String,String> pair : map.entrySet()){
if(pair.getKey().equalsIgnoreCase(name)){
count++;
}
}
return count;
}
public static int getSameLastNameCount(HashMap<String, String> map, String lastName) {
//write your code here
int count=0;
for(HashMap.Entry<String,String> pair : map.entrySet()){
if(pair.getValue().equalsIgnoreCase(lastName)){
count++;
}
}
return count;
}
public static void main(String[] args) {
// HashMap<String, String> map = Solution.createMap() ;
// int f = getSameFirstNameCount( map, "a");
// int l = getSameLastNameCount( map, "f");
// System.out.println(f);
// System.out.println(l);
}
}