QUESTION 20자격증/OCJP_ExamC2018. 7. 24. 01:13
Table of Contents
반응형
QUESTION 20Given:public class PingPong implements Runnable{synchronized void hit(long n){for (int i = 1; i < 3; i++)System.out.print(n + "-" + i + " ");}public static void main(String[] args) {new Thread(new PingPong()).start();new Thread(new PingPong()).start();}public void run() {hit(Thread.currentThread().getId());}}Which two statements are true? (Choose two.)A. The output could be 8-1 7-2 8-2 7-1B. The output could be 7-1 7-2 8-1 6-1C. The output could be 8-1 7-1 7-2 8-2D. The output could be 8-1 8-2 7-1 7-2Solution : CD
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 22 (0) | 2018.07.24 |
---|---|
QUESTION 21 (0) | 2018.07.24 |
QUESTION 19 (0) | 2018.07.24 |
QUESTION 18 (0) | 2018.07.24 |
QUESTION 17 (0) | 2018.07.21 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상