What will be output from the following code:

```
public void t e s t 8 ( ) f
int x = 1 2 ;
int y = 0 ;
while ( x !< 10 j j y < 1)
{
x = x + 1 ;
y = y + 1 ;
System . out . p r i n t l n ( x + " , " + y ) ;
}
}
```


You will get compiler errors.
2 errors found:
File: C:\DrJava\SoundExTest.java [line: 72]
Error: ')' expected
File: C:\DrJava\SoundExTest.java [line: 78]
Error: illegal start of expression
If you fix the code to be: while ((!(x < 10)) || y < 1) then it will loop forever
(or until you stop it). The ¯rst few values output will be:
13, 1
14, 2
15, 3
...

Computer Science & Information Technology

You might also like to view...

Testing an Android app is called ____________________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

According to Netscape co-founder Mark Andreessen, approximately how many people will own mobile phones worldwide, in the next 10 years?

A. 3 billion B. 4 billion C. 5 billion D. 6 billion

Computer Science & Information Technology

In a motion tween, the rotation direction can be counterclockwise which is indicated by ____.

A. CW B. CCW C. CC D. CWW

Computer Science & Information Technology

Once Active Directory has been installed, a default site link is created. What is the name of this site link?

A. FIRSTSITE B. DEFAULTIPSITELINK C. IPSITECONTAINER D. ADSITEHOLDER

Computer Science & Information Technology