This is my code...
public class HashTest {
public static void main(String[] args) {
HashTest ht = new HashTest();
ht.test(?,"abc");
}
public void test(HashMap<String, String> hm, String country) {
Scanner sc = new Scanner(System.in);
System.out.println("No. of Input : ");
int n = sc.nextInt();
System.out.println("Enter Values : ");
String capital = "";
int city;
for (int i = 0; i < n ; i++) {
country = sc.next();
capital = sc.next();
hm.put(country, capital);
if (hm.containsValue(country)) {
System.out.println("Result : " +hm.get(capital));
}
}
Now inside the main method when calling the test method, then what will be the actual parameter in place of ?
?