10/13 WTF is wrong with hashmap?


import java.util.HashMap;

public class Restaurant {
public static void main(String[] args) {

HashMap restaurantMenu = new HashMap();
restaurantMenu.put("Turkey Burger", 13) ;




Can you post the link on the exercise? I can't seem to find it. Also, please format your code.


u forgot 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.