Data-Structures 3/13 error?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

My task should be to insert an ArrayList into the main method. Every time I try to run it, it tells me, I hadnt created an object, called “weeklyTemperatures”, yet I did.
I tried restarting it, I tried copying the code and going back a few steps, going forward again and copypaste the code again… it just wont work…

Thanks for your help :slight_smile:

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-java/lessons/data-structures/exercises/arraylist?action=resume

<In what way does your code behave incorrectly? Include ALL error messages.>

```

import java.util.ArrayList;

public class For {
public static void main(String args) {
ArrayList weeklyTemperatures = new ArrayList ();

}

}

<do not remove the three backticks above>

Hi but the class name should be

public class Temperatures { 
   #here put your main method
}

Hey, just to add onto what @wizmarco said…

It looks like having a space between

new ArrayList

and

<Integer>();

may be causing the problem here. Try removing that space and with any luck it should pass.

Note: In any other environment that space wouldn’t have been an issue, but because of the nature of Codecademy’s environment sometimes these kind of pedantic issues will come up.

1 Like

Thx so much for your help! I tried it but somehow it still didnt work. I solved it now: using another browser did the trick :wink:

1 Like

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