Analyze the following code:

```
public class Test {
public static void main (String args[]) {
int i = 0;
for (i = 0; i < 10; i++);
System.out.println(i + 4);
}
}
```
a. The program has a compile error because of the semicolon (;) on the for loop line.
b. The program compiles despite the semicolon (;) on the for loop line, and displays 4.
c. The program compiles despite the semicolon (;) on the for loop line, and displays 14.
d. The for loop in this program is same as for (i = 0; i < 10; i++) { }; System.out.println(i + 4);


c. The program compiles despite the semicolon (;) on the for loop line, and displays 14.
d. The for loop in this program is same as for (i = 0; i < 10; i++) { }; System.out.println(i + 4);
This is a logic error. System.out.println(i + 4) is not a part the for loop because the for loop ends with the last semicolon at for (i=0; i < 10; i++);

Computer Science & Information Technology

You might also like to view...

The TDC Filter property allows you to ________.

a) make smooth transition effects between text and images. b) blend recordset property settings. c) filter out all records that have a cell matching the text you specify. d) filter out all records that do not have a cell matching the text you specify.

Computer Science & Information Technology

In the Channels panel, as shown in the accompanying figure, the ____ icon is useful for viewing specific colors in the document window, or to see how edits affect a specific color.

a. thumbnail b. composite c. panel d. visibility

Computer Science & Information Technology

Identify an attribute selector that selects all elem elements whose att attribute begins with text.?

A. ?elem[att|="text"] B. ?elem[att^="text"] C. ?elem[att$="text"] D. ?elem[att˜="text"]

Computer Science & Information Technology

Embedded styles, which apply to the entire webpage on which they are defined, are defined in the title section of an HTML document.

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

Computer Science & Information Technology