import java.util.HashMap;
public class Restaurant {
public static void main(String args) {
HashMap<String, Integer> restaurantMenu = new HashMap<String, Integer>();
restaurantMenu.put(“Turkey Burger”, 13) ;
}
}
import java.util.HashMap;
public class Restaurant {
public static void main(String args) {
HashMap<String, Integer> restaurantMenu = new HashMap<String, Integer>();
restaurantMenu.put(“Turkey Burger”, 13) ;
}
}
Hi,
Can you post the link on the exercise? I can’t seem to find it. Also, please format your code.
u forgot <String, Integer> after HashMap.
Here is the correct code:
HashMap<String, Integer> restaurantMenu = new HashMap<String, Integer>();
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.