Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

1. Which of the following is used to create a thread in Java?

View

2. What is the default priority of a thread in Java?

View

3. Which method is used to start a thread in Java?

View

4. Which of the following methods is executed when a thread is started?

View

5. What happens if you call run() directly instead of start() on a thread?

View

6. Which of the following methods allows a thread to pause its execution for a specific amount of time?

View

7. What is the result of calling Thread.join()?

View

8. Which class does not allow thread-safe operations?

View

9. What is a thread's state when it is waiting for another thread to release a resource?

View

10. Which of the following is not a thread state?

View

1. Which of the following is used to create a thread in Java?

<p>&nbsp;</p>

Extending the Thread class
Implementing the Runnable interface
Both a and b
None of the above

2. What is the default priority of a thread in Java?

0
5
10
1

3. Which method is used to start a thread in Java?

start()
run()
execute()
init()

4. Which of the following methods is executed when a thread is started?

main()
run()
execute()
begin()

5. What happens if you call run() directly instead of start() on a thread?

<p>&nbsp;</p>

The thread starts executing asynchronously
The thread does not start and behaves like a normal method call
A RuntimeException is thrown
None of the above

6. Which of the following methods allows a thread to pause its execution for a specific amount of time?

sleep()
wait()
pause()
halt()

7. What is the result of calling Thread.join()?

It forces the current thread to wait until the other thread finishes execution
It stops the other thread execution
It starts the other thread execution
It suspends the current thread forever

8. Which class does not allow thread-safe operations?

Vector
ArrayList
CopyOnWriteArrayList
HashMap

9. What is a thread's state when it is waiting for another thread to release a resource?

New
Runnable
Blocked
Timed Waiting

10. Which of the following is not a thread state?

<p>&nbsp;</p>

New
Running
Sleep
Exited