Question 1 of 30
In a multithreaded Java application, a developer notices that a thread is frequently entering the Blocked state while trying to access a shared resource. What does this indicate about the thread\'s behavior, and what could be a potential solution to improve its performance?
The thread is attempting to acquire a lock held by another thread, indicating contention for the resource; implementing finer-grained locking or using concurrent collections could alleviate this issue.
The thread is in a Waiting state due to a lack of available CPU resources, suggesting that the system is overloaded; increasing the number of threads may help balance the load.
The thread is in a Timed Waiting state, indicating it is waiting for a specific time period to elapse; adjusting the timeout duration could enhance its responsiveness.
The thread is in the New state and has not yet started executing; invoking the `start()` method on the thread object would be necessary to initiate its execution.