阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 201-244#99410 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 201-244#99410

年份:104年

科目:OJCP(SCJP)

232. Given: 
1. public class Threads5{ 
2. public static void main(String[] args){ 
3. new Thread(new Runnable(){ 
4. public void run(){ 
5. System.out.print("bar");
 6. }}).start(); 
7. }
 8. } 
What is the result?
(A) Compilation fails.
(B) An exception is thrown at runtime.
(C) The code executes normally and prints "bar".
(D) The code executes normally, but nothing prints.
正確答案:登入後查看