Weird error message on Generalization 13/13


#1

Hi

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: GeneralizationsD.java 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:


Thanks.


#2

Please post a link to the exercise. Thanks.


#3

https://www.codecademy.com/courses/learn-java/lessons/data-structures/exercises/generalizations-data-structures?action=lesson_resume


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

Could that be your error?

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

#5

Tried adding to the end and the error has changed to

GeneralizationsD.java:7: error: cannot find symbol
		ArrayList<String> sports = new Arraylist<String>();
		                               ^
  symbol:   class Arraylist
  location: class GeneralizationsD
1 error

#6

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


#7

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