Can someone help?
package com.codegym.task.task08.task0815;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
/*
Census
*/
public class Solution {
public static HashMap<String, String> createMap() {
HashMap<String, String> map = new HashMap<>();
map.put("joe", "ben");
map.put("jack", "richard");
map.put("Mitch", "danesh");
map.put("Kelly", "ben");
map.put("joe1", "danesh");
map.put("Kelly2", "richard");
map.put("jack3", "danesh");
map.put("Mitch2", "ben");
map.put("joe2", "gilfoyl");
map.put("Kelly3", "richard");
return map;
}
public static int getSameFirstNameCount(HashMap<String, String> map, String name) {
if (map.containsKey(name)) {
return 1;
} else return 0;
}
public static int getSameLastNameCount(HashMap<String, String> map, String lastName) {
if (map.containsValue(lastName)) {
return 1;
} else return 0;
}
public static void main(String[] args) {
}
}