Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, October 29, 2015

Codecademy > Learn Java > For Each Loop Sample Solution


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 : weeklyTemperatures) {
System.out.println(temperature);
}

}
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts