The output is X = 6 y = 0
The output is x = 7 y = 0
The output is x = 6 y = -1
The output is x = 7 y = -1
Compilation will fail.
第1题:
A.x=6y=0
B.x=7y=0
C.x=6y=-1
D.x=7y=-1
E.Compilationfails.
第2题:
第3题:
设以下变量都是int类型,则值不等于7的表达式是()。
第4题:
1. public class X implements Runnable( 2. private int x; 3. private int y; 4. 5. public static void main(String[]args) 6. X that = new X(); 7. (new Thread(that)).start(); 8. (new Thread(that)).start(); 9. ) 10. 11. public void run() ( 12. for (;;) ( 13. x++; 14. y++; 15. System.out.printIn(“x=” + x + “, y = ” + y); 16. ) 17. ) What is the result?()
第5题:
public class X implements Runnable ( private int x; private int y; public static void main(String args) ( X that = new X(); (new Thread(that)) . start( ); (new Thread(that)) . start( ); ) public synchronized void run( ) ( for (;;) ( x++; y++; System.out.printIn(“x = “ + x + “, y = “ + y); ) ) ) What is the result?()
第6题:
public class IfTest ( public static void main(string[]args) { int x = 3; int y = 1; if (x = y) system.out.printIn(“Not equal”); else system.out.printIn(“Equal”); } ) What is the result?()
第7题:
int x = 1, y =6; while (y--) { x++; } System.out.println(“x =” + x + “y =” +y); What is the result?()
第8题:
x=1
x=3
Compilation fails.
The code runs with no output. 
An exception is thrown at runtime.
第9题:
x = 6 y = 0
x = 7 y = 0
x = 6 y = -1
x = 7 y = -1
Compilation fails.
第10题:
x=2 y=4 x=3 y=9 x=4 y=16
x=4 y=16 x=4 y=16 x=4 y=16
x=4 y=16
x=2 y=4 x=2 y=4 x=2 y=4
第11题:
5,6
5,5
6,5
6,6
第12题:
x=y=6,x+y,x+1
x=y=6,x+y,y+1
x=6,x+1,y=6,x+y
y=6,y+1,x=y,x+1
第13题:
第14题:
如果输入的数据是2,3,4,则下面程序的输出应为() PROGRAM SAM(INPUT,OUTPUT); VAR i,x,y:integer; BEGIN FOR i:=1 TO 3 DO BEGIN Read(x); y:=sqr(x)END; Writeln(‘x=’,x,‘y=’,y)END.
第15题:
int x=0; int y 10; do { y--; ++x; } while (x < 5); System.out.print(x + “,“ + y); What is the result?()
第16题:
public class WhileFoo { public static void main (String []args) { int x= 1, y = 6; while (y--) {x--;} system.out.printIn(“x=” + x “y =” + y); } } What is the result?()
第17题:
设以下变量均为int类型,则值不等于7的表达式是()。
第18题:
public class IfTest ( public static void main(stringargs) { int x = 3; int y = 1; if (x = y) system.out.printIn(“Not equal”); else system.out.printIn(“Equal”); } ) What is the result?()
第19题:
int x = 3; int y = 1; if (x = y) { System.out.println(“x = “ + x); } What is the result? ()
第20题:
The output is “Equal”
The output in “Not Equal”
An error at line 5 causes compilation to fall.
The program executes but does not print a message.
第21题:
Errors at lines 7 and 8 cause compilation to fail.
The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”).
The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”).
The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears only for once (for example, “x=1, y=1” followed by “x=2, y=2”).
第22题:
The output is x = 6 y = 0
The output is x = 7 y = 0
The output is x = 6 y = -1
The output is x = 7 y = -1
Compilation will fail.
第23题:
An error at line 11 causes compilation to fail.
Errors at lines 7 and 8 cause compilation to fail.
The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”)
The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”)
The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=2s, y=2”)