第1题:
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 }
第2题:
package test; class Target{ public String name="hello"; } What can directly access and change the value of the variable name?()
第3题:
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.
第4题:
What is the most likely problem with this script () VAR=1 ((VAR=$VAR+1)) while [ $VAR -It 10 ] do echo $VAR done
第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?()
第6题:
What is the importance of using Virtual Output Queues on ingress Line Cards in a high-end router?()
第7题:
Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()
第8题:
A. any class
B. only the Target class
C. any class in the test package
D. any class that extends Target
第9题:
What does it mean for a variable in the Application Editor to be defined as a parameter?()
第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?()