5. String foo = “base”; 6. foo.substring(0,3); 7. foo.concat(“ket”) 8. Type the value of foo at line 8.()
public class Foo { public void main (String [] args) { system.out.printIn(“Hello World.”); } } What is the result?()
10. public class Foo implements java.io.Serializable { 11. private int x; 12. public int getX() { return x; } 12.publicFoo(int x){this.x=x; } 13. private void writeObject( ObjectOutputStream s) 14. throws IOException { 15. // insert code here 16. } 17. } Which code fragment, inserted at line 15, will allow Foo objects to be correctly serialized and deserialized?()
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?()
public class foo { public static void main (String[]args) { String s; system.out.printIn (“s=” + s); } } What is the result?()
public class foo { static String s; public static void main (String[]args) { system.out.printIn (“s=” + s); } } What is the result?()
public class Foo { public void main (String args) { system.out.printIn(“Hello World.”); } } What is the result? ()
public class foo { public static void main (Stringargs) { String s; system.out.printIn (“s=” + s); } } What is the result?()
String foo = “blue”; Booleanbar = new Boolean [1]; if (bar[0]) { foo = “green”; } What is the result?()
Javascript中,foo对象有att属性,那么以下获取att属性值的表达式哪个是错误的?()