问答题What is the value of the variable output at line 24?

题目
问答题
What is the value of the variable output at line 24?
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given:Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ?()

A.move the line 12 print statement into the foo() method

B.change line 7 to public synchronized void go() {

C.change the variable declaration on line 2 to private volatile int x;

D.wrap the code inside the foo() method with a synchronized( this ) block

E.wrap the for loop code inside the go() method with a synchronized block synchronized(this){ //for loop code here }


参考答案:A, D

第2题:

package test; class Target{ public String name="hello"; } What can directly access and change the value of the variable name?()

  • A、any class
  • B、only the Target class
  • C、any class in the test package
  • D、any class that extends Target

正确答案:C

第3题:

Click the Exhibit button. What is the result? ()

A.Value is: 8

B.Compilation fails.

C.Value is: 12

D.Value is: -12

E.The code runs with no output.

F.An exception is thrown at runtime.


参考答案:A

第4题:

What is the most likely problem with this script () VAR=1   ((VAR=$VAR+1))    while [ $VAR -It 10 ]    do   echo $VAR  done

  • A、#!/bin/ksh line is missing
  • B、Variable name VAR is not properly initialized
  • C、Loop variable is not incremented inside the loop
  • D、Replace brackets with braces

正确答案:C

第5题:

public class X {   public static void main (Stringargs) {   int a = new int [1]   modify(a);   System.out.printIn(a[0]);   }   public static void modify (int a) {   a[0] ++;    }    }   What is the result?()  

  • A、 The program runs and prints “0”
  • B、 The program runs and prints “1”
  • C、 The program runs but aborts with an exception.
  • D、 An error “possible undefined variable” at line 4 causes compilation to fail.
  • E、 An error “possible undefined variable” at line 9 causes compilation to fail.

正确答案:B

第6题:

What is the importance of using Virtual Output Queues on ingress Line Cards in a high-end router?()

  • A、Prevents head-of-line blocking
  • B、Uses less memory
  • C、Increases forwarding performance
  • D、Simplifies configuration

正确答案:A

第7题:

Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()  

  • A、The value of an int is undetermined.
  • B、The value of all numeric types is zero.
  • C、The compiler may issue an error if the variable is used before it is initialized.
  • D、The value of a String variable is "" (empty string).
  • E、The value of all object variables is null.

正确答案:B,E

第8题:

Given:What can directly access and change the value of the variable name?()

A. any class

B. only the Target class

C. any class in the test package

D. any class that extends Target


参考答案:C

第9题:

What does it mean for a variable in the Application Editor to be defined as a parameter?()

  • A、The variable can be used to pass data to and from subflows.  
  • B、The value for that variable can be supplied via Application Configuration in Application Administration.  
  • C、The value for that variable is defined by the calling application.  
  • D、The variable can be used in conditional steps.  
  • E、The variable can be used to pass data to and from VoiceXML applications.

正确答案:B

第10题:

1. public class Test { 2. public static String output =””; 3.  4. public static void foo(int i) { 5. try { 6. if(i==1) { 7. throw new Exception(); 8. } 9. output += “1”; 10. } 11. catch(Exception e) { 12. output += “2”; 13. return; 14. } 15. finally { 16. output += “3”;17. } 18. output += “4”; 19. } 20.  21. public static void main(String args[]) { 22. foo(0); 23. foo(1); 24.  25. }26. } What is the value of the variable output at line 23?()


正确答案:13423

更多相关问题