7/13 code executes, but assignment fails?


code runs and does what I want, but still it doesn't give me a pass

import java.util.ArrayList;

public class TemperaturesC {
	public static void main(String[] args) {

		ArrayList<Integer> weeklyTemperatures = new ArrayList<Integer>();
		weeklyTemperatures.add(2, 111);

		for (int j = 0; j < weeklyTemperatures.size(); j++ ) {
   System.out.println( weeklyTemperatures.get(j) );



Upon looking at this, I do not see anything wrong, however... Make sure your spelling and data input for everything is correct, and make sure it follows the requested method, and succeeds in the requested result.


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