⟩ Explain some ways in which a thread can enter the waiting state?
A thread can enter the waiting state by the following ways:
We can invoke sleep() method of the thread.
An attempt to acquire the object’s lock can put the thread in waiting mode.
We can also invoke wait() method of the thread.
A thread can also be entered in waiting state by invoking its suspend() method.