자격증/OCJP_ExamB

QUESTION 17

IT grow. 2018. 7. 9. 20:55
반응형

QUESTION 17


 Given that t1 is a reference to a live thread, which is true? 

 

A. The Thread.sleep() method can take t1 as an argument. 

B. The Object.notify() method can take t1 as an argument. 

C. The Thread.yield() method can take t1 as an argument. 

D. The Thread.setPriority() method can take t1 as an argument. 

E. The Object.notify() method arbitrarily chooses which thread to notify. 


Solution : E


plus imformation 


sleep에는 milsec의 인수만 들어간다 . 

살아있는 쓰레드를 notify or yield 할 수 없다.

setpriority에는 1~10 숫자만 들어간다.

notify는 임의의 쓰레드를 깨우므로 답이된다.




반응형