<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-java/lessons/data-structures/exercises/arraylist-access?action=lesson_resume&link_content_target=interstitial_lesson
<In what way does your code behave incorrectly? Include ALL error messages.>
There are no errors in the console, and the correct value is printed. The code is not accepted, however, and instead I get the general error message “Did you print out the lowest temperature? Use the example to help you.” Finally I gave up and clicked “Get Code”, with the same result. Their code is given below. Can anyone help? Thanks!
import java.util.ArrayList;
public class Temperatures {
public static void main(String[] args) {
ArrayList<Integer> weeklyTemperatures = new ArrayList<Integer>();
weeklyTemperatures.add(78);
weeklyTemperatures.add(67);
weeklyTemperatures.add(89);
weeklyTemperatures.add(94);
System.out.println( weeklyTemperatures.get(1) );
}
}
<do not remove the three backticks above>