Question: The following code should add the date (a value between 1 and 30) of all of the cool days of September to the list coolDays

The following code should add the date (a value between 1 and 30) of all of the cool days of September to the list coolDays. A cool day is a day where the temperature was less than or equal to 5 degrees Celsius.

List dailyT = new ArrayList<>(); // some code here that adds the daily temperature for each day of September to dailyT // dailyT is a list of 30 temperatures from Sep 1 to Sep 30 List coolDays = new ArrayList<>(); for (int i = 0; i < 30; i++) { /* what goes here? */ }

What code should replace the comment? You may need more than one line of code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!