I benn trying to fix this block.There is no error in there I guess but it deosnt allow me to go on... please help me out!

import java.util.ArrayList;

public class TemperaturesForEach {
public static void main(String args) {

	ArrayList<Integer> weeklyTemperatures = new ArrayList<Integer>();
	weeklyTemperatures.add(78);
	weeklyTemperatures.add(67);
	weeklyTemperatures.add(89); 
	weeklyTemperatures.add(94);
	
	for (Integer temperature : 
     weeklyTemperature) {
		System.out.println(temperature);
	}

}

}

you forget the s of weeklyTemperature

MMmmh so close. That variable does actually represent one temperature, it should not have an s. But weeklyTemperature isn’t defined.

yeah it’s a mistake, i’ve corrected it. :+1:

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