

MCQOPTIONS
Saved Bookmarks
This section includes 21 Mcqs, each offering curated multiple-choice questions to sharpen your Java Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the output of this program?
|
A. | [New Thread created...,5,main] |
B. | New Thread created... |
C. | main |
D. | Thread[New Thread created...,5,main] |
E. | None of these |
Answer» E. None of these | |
2. |
What is the output of this program?
|
A. | My Thread created... |
B. | My Thread |
C. | Thread created... |
D. | New Thread |
E. | None of these |
Answer» B. My Thread | |
3. |
What is the output of this program?
|
A. | Runtime Error |
B. | Compilation Error |
C. | Thread[My Thread,5,main]. |
D. | My Thread |
E. | None of these |
Answer» C. Thread[My Thread,5,main]. | |
4. |
What is the output of this program?
|
A. | New Thread... |
B. | [New Thread...,5,main] |
C. | Thread[New Thread...,5,main] |
D. | Thread |
E. | None of these |
Answer» D. Thread | |
5. |
What is the output of the thread in output of this program?
|
A. | True |
B. | 0 |
C. | 1 |
D. | False |
E. | None of these |
Answer» B. 0 | |
6. |
What is the name of the thread in output of this program?
|
A. | main |
B. | Thread one |
C. | Thread |
D. | Name |
E. | None of these |
Answer» C. Thread | |
7. |
What is the priority of the thread in output of this program?
|
A. | 2 |
B. | 1 |
C. | 0 |
D. | 5 |
E. | 10 |
Answer» E. 10 | |
8. |
What is the output of this program?
|
A. | Thread |
B. | Thread one |
C. | main |
D. | Thread[Thread one,5,main] |
E. | None of these |
Answer» E. None of these | |
9. |
What is the name of the thread in output of this program?
|
A. | First |
B. | main |
C. | Thread |
D. | All of above |
E. | None of these |
Answer» B. main | |
10. |
What is the priority of the thread in output of this program?
|
A. | 0 |
B. | 1 |
C. | 2 |
D. | 4 |
E. | 5 |
Answer» F. | |
11. |
What is the output of this program?
|
A. | Thread |
B. | Main |
C. | 5 |
D. | Thread[main,5,main] |
E. | None of these |
Answer» E. None of these | |
12. |
What is the output of this program?
|
A. | First |
B. | Second |
C. | Running Main Thread... |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
13. |
What is the output of this program?
|
A. | Thread[New Thread created...,10,main] |
B. | [New Thread created...,10,main] |
C. | New Thread created... |
D. | [New Thread created...,10,main]Thread |
E. | None of these |
Answer» B. [New Thread created...,10,main] | |
14. |
What is the output of this program?
|
A. | New Thread |
B. | Thread |
C. | My Thread |
D. | Compilation Error |
E. | Runtime Error |
Answer» F. | |
15. |
What is the output of this program?
|
A. | Compilation Error |
B. | True |
C. | Runtime Error |
D. | False |
E. | None of these |
Answer» C. Runtime Error | |
16. |
What is the output of this program?
|
A. | Main Thread Running... |
B. | First |
C. | Second |
D. | True |
E. | False |
Answer» F. | |
17. |
What is the output of the thread in output of this program? |
A. | True |
B. | 0 |
C. | 1 |
D. | False |
E. | None of these |
Answer» B. 0 | |
18. |
What is the name of the thread in output of this program? |
A. | First |
B. | main |
C. | Thread |
D. | All of above |
E. | None of these |
Answer» B. main | |
19. |
What is the priority of the thread in output of this program? |
A. | 0 |
B. | 1 |
C. | 2 |
D. | 4 |
E. | 5 |
Answer» F. | |
20. |
Which of this method is used to find out that a thread is still running or not? |
A. | checkRun() |
B. | run() |
C. | Alive() |
D. | isAlive() |
E. | None of these |
Answer» E. None of these | |
21. |
Which of this method can be used to make the main thread to be executed last among all the threads? |
A. | call() |
B. | join() |
C. | stop() |
D. | sleep() |
E. | None of these |
Answer» E. None of these | |