What output is produced by the following code fragment?

```
int num = 1, max = 20;
while (num < max)
{
if (num%2 == 0)
System.out.println(num);
num++;
}

```


The output produced is:
2
4
6
8
10
12
14
16
18

Computer Science & Information Technology

You might also like to view...

Forms can include calculations and list boxes.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The first step in formally managing a project of any size is to define the project ____.

A. scope B. goal C. parameters D. hierarchy

Computer Science & Information Technology

Which of the following service startup types increases the amount of time for a Windows 10 computer to boot up?

A) Disabled B) Sequential C) Automatic (Delayed Start) D) Automatic

Computer Science & Information Technology

A technician has been asked to install a new PATA CD/DVD drive in a tower computer that currently has two PATA hard drives already installed. One hard drive is configured as primary master and is located in the bay closest to the motherboard. The second drive is configured as secondary master and is in the bay above the first hard drive. The only available bay is above the second drive, and the

only cable that will reach is the one that goes to the second hard drive. How will the technician configure the drive? A) As secondary slave B) As primary secondary C) As secondary master D) As primary slave

Computer Science & Information Technology