An exception is thrown.
The code does no compile.
“Hello World.” Is printed to the terminal.
The program exits without printing anything.
第1题:
public class Test { public static void main (String args) { string foo = “blue”; string bar = foo; foo = “green”; System.out.printIn(bar); } } What is the result?()
第2题:
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?()
第3题:
public class foo { public static void main (Stringargs) { String s; system.out.printIn (“s=” + s); } } What is the result?()
第4题:
public class foo { public static void main (String[]args) { String s; system.out.printIn (“s=” + s); } } What is the result?()
第5题:
class A { public A() { System.out.println(“hello from a”); } } class B extends A { public B () { System.out.println(“hello from b”); super(); } } public class Test { public static void main(String args[]) { A a = new B(); } } What is the result when main is executed?()
第6题:
public class Foo { public void main (String args) { system.out.printIn(“Hello World.”); } } What is the result? ()
第7题:
public class foo { public static void main (stringargs) try {return;} finally {system.out.printIn(“Finally”);} } What is the result?()
第8题:
public class Foo implements Runnable ( public void run (Thread t) { system.out.printIn(“Running.”); } public static void main (String[] args) { new thread (new Foo()).start(); } ) What is the result?()
第9题:
public class foo { public static void main (string[]args) try {return;} finally {system.out.printIn(“Finally”);} } What is the result?()
第10题:
public class foo { static String s; public static void main (String[]args) { system.out.printIn (“s=” + s); } } What is the result?()