Weird error message on Generalization 13/13



I’m on 13/13 on Generalization, and step 1 in the instructions says “Inside of the main method and before the for each loop, create an ArrayList called sports that stores String types.”

That’s what I’ve done, and when I run it the console spits out:

Note: uses unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details.

I’ve compared my code to other people’s code multiple times and Googled the error, but I didn’t get any helpful answers for the error, and my code looks identical to the stuff I found on other pages here. I’ve also tried refreshing the Chrome tab, and resetting the editor multiple times. Is there something wrong in my code that’s causing this or is it a problem on Codecademy’s end?

Here’s a screenshot:



Please post a link to the exercise. Thanks.


ArrayList<String> sports = new ArrayList();

Could that be your error?

ArrayList<String> sports = new ArrayList<String>();


Tried adding to the end and the error has changed to error: cannot find symbol
		ArrayList<String> sports = new Arraylist<String>();
  symbol:   class Arraylist
  location: class GeneralizationsD
1 error


Wait, It’s saying it’s fine now. Thanks for the assistance


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