The following code prints the first print statement __________ times, the second print statement __________ times, for a total of ____________ total printed lines of text. /** * Main method. * * @param args command-line arguments (not used) */ public static void main(String[] args) { final int DAYS_IN_A_YEAR = 365; final int HOURS_IN_A_DAY = 24; for (int i = 0; i < DAYS_IN_A_YEAR; i++) { System.out.println("Today is day " + (i + 1) + " of " + DAYS_IN_A_YEAR); for (int j = 0; j < HOURS_IN_A_DAY; j++) { System.out.println("This is hour " + (j + 1) + " of " + HOURS_IN_A_DAY); } } } Select one: 365, 8760, 9125 364, 8736, 9100 366, 8784, 9150 none
The following code prints the first print statement __________ times, the second print statement __________ times, for a total of ____________ total printed lines of text.
/**
* Main method.
*
* @param args command-line arguments (not used)
*/
public static void main(String[] args)
{
final int DAYS_IN_A_YEAR = 365;
final int HOURS_IN_A_DAY = 24;
for (int i = 0; i < DAYS_IN_A_YEAR; i++)
{
System.out.println("Today is day " + (i + 1) + " of " + DAYS_IN_A_YEAR);
for (int j = 0; j < HOURS_IN_A_DAY; j++)
{
System.out.println("This is hour " + (j + 1) + " of " + HOURS_IN_A_DAY);
}
}
}
365, 8760, 9125
364, 8736, 9100
366, 8784, 9150
none
The loop will run 365 times, beginning with value 0 and ending with the (exclusive) value stored in variable DAYS_IN_A_YEAR.
Step by step
Solved in 3 steps