13/13 Creating sports ArrayList


Hi, I'm stuck at task #1 of "13. Generalizations". I thought I created the ArrayList correctly, but I keep on getting an error message stating "Did you create an ArrayList named 'sports'?", which is preventing me from moving on to the next task. Any help would be appreciated, thanks!

import java.util.*;

public class RestaurantForEach {
	public static void main(String[] args) {
  	ArrayList<String> sports = new ArrayList<String>();

		HashMap<String, Integer> restaurantMenu = new HashMap<String, Integer>();

		restaurantMenu.put("Turkey Burger", 13);
		restaurantMenu.put("Naan Pizza", 11);
		restaurantMenu.put("Cranberry Kale Salad", 10);


		for (String item : restaurantMenu.keySet()) {

			System.out.println("A " + item + " costs " + restaurantMenu.get(item) + " dollars.");




Sports and Restaurant... doesn't sound like a match does it?:slight_smile:


Haha indeed, it's an interesting combo :stuck_out_tongue:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.