单选题What is the result?()A 1B 12C 14D 123E Compilation fails.F An exception is thrown at runtime.

题目
单选题
What is the result?()
A

1

B

12

C

14

D

123

E

Compilation fails.

F

An exception is thrown at runtime.

参考答案和解析
正确答案: B
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

public static void main(String[] args) {  for (int i=0;i<= 10;i++){  if( i>6) break;  }  System.out.println(i);  }  What is the result?() 

  • A、 6
  • B、 7
  • C、 10
  • D、 11
  • E、 Compilation fails.
  • F、 An exception is thrown at runtime.

正确答案:E

第2题:

public class Yippee {  public static void main(String [] args) {  for(int x = 1; x < args.length; x++) {  System.out.print(args[x] +“ “);  }  }  }  and two separate command line invocations:  java Yippee  java Yippee 1234  What is the result?() 

  • A、 No output is produced. 123
  • B、 No output is produced. 234
  • C、 No output is produced. 1234
  • D、 An exception is thrown at runtime. 123
  • E、 An exception is thrown at runtime. 234
  • F、 An exception is thrown at rijntime. 1234

正确答案:B

第3题:

Given:What is the result when the go() method is invoked?()

A.00

B.0001

C.000120

D.00012021

E.Compilation fails.

F.An exception is thrown at runtime.


参考答案:C

第4题:

单选题
Given: What is the result?()
A

collie

B

harrier

C

Compilation fails.

D

collie harrier

E

An exception is thrown at runtime.


正确答案: A
解析: 暂无解析

第5题:

public classYippee{ public static void main(String[]args){ for(intx=1;xSystem.out.print(args[x]+""); } } } and two separate command line invocations:j avaYippee javaYippee1234 What is the result?()

  • A、No output is produced.       123
  • B、No output is produced.        234
  • C、No output is produced.       1234
  • D、An exception is thrown at runtime.        123
  • E、An exception is thrown at runtime.         234
  • F、An exception is thrown at runtime.        1234

正确答案:B

第6题:

System.out.format(”Pi is approximately %d.”, Math.PI);  What is the result?() 

  • A、 Compilation fails.
  • B、 Pi is approximately 3.
  • C、 Pi is approximately 3.141593.
  • D、 An exception is thrown at runtime.

正确答案:D

第7题:

System.out.println(Math.sqrt(-4D));  What is the result?()  

  • A、 –2
  • B、 NaN
  • C、 Infinity
  • D、 Compilation fails.
  • E、 An exception is thrown at runtime.

正确答案:B

第8题:

String a = “ABCD”;  String b = a.toLowerCase();  b.replace(‘a’, ‘d’);  b.replace(‘b’, ‘c’);  System.out.println(b);   What is the result? () 

  • A、 abcd
  • B、 ABCD
  • C、 dccd
  • D、 dcba
  • E、 Compilation fails.
  • F、 An exception is thrown at runtime.

正确答案:A

第9题:

String a = null;  a.concat(“abc”);  a.concat(“def”);  System.out.println(a);   What is the result?()  

  • A、 abc
  • B、 null
  • C、 abcdef
  • D、 Compilation fails.
  • E、 The code runs with no output.
  • F、 An exception is thrown at runtime.

正确答案:F

第10题:

单选题
public class Yippee {  public static void main(String [] args) {  for(int x = 1; x < args.length; x++) {  System.out.print(args[x] +“ “);  }  }  }  and two separate command line invocations:  java Yippee  java Yippee 1234  What is the result?()
A

 No output is produced. 123

B

 No output is produced. 234

C

 No output is produced. 1234

D

 An exception is thrown at runtime. 123

E

 An exception is thrown at runtime. 234

F

 An exception is thrown at rijntime. 1234


正确答案: E
解析: 暂无解析

更多相关问题