7/13 i fixed it as a moderator told me to do but the same thing happened


#1

import java.util.ArrayList;

public class TemperaturesC {

public static void main(String[] args) {

	ArrayList<Integer> weeklyTemperatures = new ArrayList<Integer>();
	weeklyTemperatures.add(78);
	weeklyTemperatures.add(67);
	weeklyTemperatures.add(89);
	weeklyTemperatures.add(94);
	weeklyTemperatures.add(2, 111);

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

}

}

}


#2

it says Use the example to help you create the for loop and use the get method.


#3

nvm i wrote j ++ instead of j++


#4

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