阿摩線上測驗
登入
首頁
>
OJCP(SCJP)
>
104年 - SCJP 201-244#99410
>
240. Place a Class on each method that is declared in the class.
其他申論題
228. Which three will compile and run without exception? (Choose three.) (A) private synchronized Object o; (B)(C) public synchronized void go(){/* code here */} (D) private synchronized(this) void go(){/* code here */} (E) (F)
#415654
236. Given: 1. class Computation extends Thread{ 2. 3. private int num; 4. private boolean isComplete; 5. private int result; 6. 7. public Computation(int num){this.num = num;} 8. 9. public synchronized void run(){ 10. result = num * 2; 11. isComplete = true; 12. notify(); 13. } 14. 15. public synchronized int getResult(){ 16. while(!isComplete){ 17. try{ 18. wait(); 19. }catch(InterruptedException e){} 20. } 21. return result; 22. } 23. 24.public static void main(String[] args){ 25. Computation[] computations = new Computation[4]; 26. for(int i=0; i<computations.length; i++){ 27. computations[i] = new Computation(i); 28. computations[i].start(); 29. } 30. for(Computation c : computations) 31. System.out.print(c.getResult() + " "); 32. } 33. } What is the result? (A) The code will deadlock. (B) The code may run with no output. (C) An exception is thrown at runtime. (D) The code may run with output "0 6". (E) The code may run with output "2 0 6 4". (F) The code may run with output "0 2 4 6".
#415655
237. Place the code elements into the class so that the code compiles and prints "Run. Run. doIt. " in exactly that order. Note that there may be more than one correct solution.
#415656
238. Which two code fragments will execute the method doStuff() in a separate thread? (Choose two.) (A) (B) (C) (D) (E) (F)
#415657
細胞激素風暴(cytokine storm) (5 分)?
#415659
細胞凋亡(apoptosis)(5 分)?
#415660
【已刪除】1. Analyze the structure system shown in the given figures (1). Determine the maximum shear force, bending moment and axial force in the structure, and draw the N-D, V-D and M-D. (25 scores)
#415661
【已刪除】2. Figure (2) shows a statically determinate beam. Determine the shear force and the bending moment for the beam, and draw the V-D and M-D.(10 scores) Determine the deflection at D. (10 scores)
#415662
【已刪除】3.Figure (3) shows a statically determinate beam. Determine the shear force and the bending moment for the beam, and draw the V-D and M-D.(10 scores) Determine the maximum deflection and angel of rotation. (15 scores)
#415663
【已刪除】4. Figure (4) shows a truss system. Determine the member axial force in the truss systems (15 scores), and the vertical displacement at joint G.(15 scores)
#415664