8.
A. prints
B. borrows
C. sells
D. receives
A.b=-0.6 B. b= -0.75 C.α=1.6 D. α=8. 5 E.b= -1.33
点击查看答案
1. public class A { 2. public String doit(int x, int y) { 3. return “a”; 4. } 5. 6. public String doit(int... vals) { 7. return “b”; 8. } 9. } Given: 25. A a=new A(); 26. System.out.println(a.doit(4, 5)); What is the result?() A、 Line 26 prints “a” to System.out.B、 Line 26 prints „b” to System.out.C、 An exception is thrown at line 26 at runtime.D、 Compilation of class A will fail due to an error in line 6.
单选题1.public classA{ 2.public String doit(intx,inty){ 3.return"a"; 4.} 5. 6.public String doit(int...vals){ 7.return"b"; 8.} 9.} And: 25.A a=new A(); 26.System.out.println(a.doit(4,5)); What is the result?()A Line 26 prints a to System.out.B Line 26 prints b to System.out.C An exception is thrown at line 26 at runtime.D Compilation of class A will fail due to an error in line 6.
单选题Given: What is the result?()ACompilation fails.BAn exception is thrown at runtime.CThe code executes and prints "running".DThe code executes and prints "runningrunning".EThe code executes and prints "runningrunningrunning".
单选题1. public class ForBar { 2. public static void main(String []args) { 3. int i = 0, j = 5; 4. tp: for (;;) { 5. i ++; 6. for(;;) 7. if(i > --j) break tp; 8. } 9. system.out.printIn(“i = ” + i + “, j = “+ j); 10. } 11. } What is the result?()AThe program runs and prints “i=1, j=0”BThe program runs and prints “i=1, j=4”CThe program runs and prints “i=3, j=4”DThe program runs and prints “i=3, j=0”EAn error at line 4 causes compilation to fail.FAn error at line 7 causes compilation to fail.
单选题What is the result( )?AThe program prints “0”.BThe program prints “4”.CThe program prints “8”.DThe program prints “12”.EThe code does not compile.
问答题A farmer buys a horse for $60. He sells it to his neighbour for $70. Then he discovers he could have made a better deal. He borrows $10 from his wife, and buys the horse back for $80. He then sells it to another neighbour for $90. How much money did he make?