What output is produced by the following code fragment?

```
for (int num = 0; num <= 200; num += 2)
System.out.println(num);
```


The output produced is the even numbers from 0 to 200:
0
2
4
and so on until…
198
200

Computer Science & Information Technology

You might also like to view...

Which if statement would be true if you needed to see if x (an int) was less than 5 and y (an int) was greater than 7?

A. if ( x < 5 || y > 7 ) B. if ( x < 5 && y > 7 ) C. if ( x <= 5 || y >7 ) D. if( x < 5 && y < 7)

Computer Science & Information Technology

?Edward, an economist, creates a PowerPoint presentation to show the contribution of IT industry to Canada's income. In one of the slides containing two graphs, he wants to align one graph alongside the other accurately. In this scenario, which of the following will help Edward align the two graphs accurately?

A. ?A smart guide B. ?A sizing handle C. ?A QuickArt tool D. ?A SmartArt tool

Computer Science & Information Technology

Without a warning banner, what right might employees assume they have when using a company’s computer systems and network accesses?

a. Authority b. Privacy c. Consent d. Anonymity

Computer Science & Information Technology

?What keystroke can you use to invoke possible code completion suggestions as you type an XML or Java line of code?

A. ?Ctrl+space B. ?Alt+home C. ?Ctrl+end D. ?Alt+insert

Computer Science & Information Technology