Hello
Hello World
Compilation fails.
Hello World 5
The code runs with no output.
第1题:
在VBA中,TN变量名中不合法的是( )。
A.Hello
B.Hello World
C.3hello
D.Hello World
第2题:
public class Foo { public void main (String args) { system.out.printIn(“Hello World.”); } } What is the result? ()
第3题:
语句PrintFormat(“Hello World”,“>”)的输出结果是()。
第4题:
10. public class Hello { 11. String title; 12. int value; 13. public Hello() { 14. title += “ World”; 15. } 16. public Hello(int value) { 17. this.value = value; 18. title = “Hello”; 19. Hello(); 20. } 21. } and: 30. Hello c = new Hello(5); 31. System.out.println(c.title); What is the result?()
第5题:
collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第6题:
AAA
BBB
Compilation fails.
The code runs with no output.
第7题:
test
Exception
Compilation fails.
NullPointerException
第8题:
An exception is thrown.
The code does no compile.
“Hello World.” Is printed to the terminal.
The program exits without printing anything.
第9题:
An exception is thrown at runtime.
int Long
Compilation fails.
Short Long
第10题:
Hello
Hello Foo
Hello world
Compilation fails.
The code does not run.
第11题:
B
The code runs with no output.
Compilation fails because of an error in line 12.
Compilation fails because of an error in line 15.
Compilation fails because of an error in line 18.
第12题:
Hello
Hello World
Compilation fails.
Hello World 5
The code runs with no output.
An exception is thrown at runtime.
第13题:
class MyThread extends Thread { public void run() { System.out.println(“AAA”); } public void run(Runnable r) { System.out.println(“BBB”); } public static void main(String[] args) { new Thread(new MyThread()).start(); } } What is the result?()
第14题:
public class Foo { public void main( String[] args ) { System.out.println( “Hello” + args[0] ); } } What is the result if this code is executed with the command line?()
第15题:
public class X { public static void main (String[]args) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()
第16题:
public class ClassA { public int getValue() { int value=0; boolean setting = true; String title=”Hello”; (value || (setting && title == “Hello”)) { return 1; } (value == 1 & title.equals(”Hello”)) { return 2; } } } And: ClassA a = new ClassA(); a.getValue(); What is the result?()
第17题:
Hello
Hello World
Compilation fails.
Hello World 5
The code runs with no output.
An exception is thrown at runtime.
第18题:
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.
第19题:
TestA
TestB
Compilation fails.
An exception is thrown at runtime.
第20题:
The program runs and prints “Hello”
An error causes compilation to fail.
The program runs and prints “Hello world!”
The program runs but aborts with an exception.
第21题:
The code runs with no output.
Compilation fails.
An exception is thrown at runtime.
ClassC is displayed.
第22题:
The code runs with no output.
An exception is thrown at runtime.
Compilation fails because of an error in line 20.
Compilation fails because of an error in line 21.
Compilation fails because of an error in line 23.
Compilation fails because of an error in line 25.
第23题:
1
2
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.