자격증/OCJP_ExamA

QUESTION 55

IT grow. 2018. 7. 8. 21:20
반응형

QUESTION 55 


Given: 

 

6. public class Threads2 implements Runnable { 

7.  

8.     public void run() { 

9.         System.out.println("run."); 

10.         throw new RuntimeException("Problem"); 

11.     } 

12.     public static void main(String[] args) { 

13.         Thread t = new Thread(new Threads2()); 

14.         t.start(); 

15.         System.out.println("End of method."); 

16.     } 

17. } 

 

Which two can be results? (Choose two.) 

 

A. java.lang.RuntimeException: Problem 

B. run. java.lang.RuntimeException: Problem 

C. End of method. java.lang.RuntimeException: Problem 

D. End of method. run. java.lang.RuntimeException: Problem 

E. run. java.lang.RuntimeException: Problem End of method. 


Solution : DE

반응형