290 B
290 B
What are three ways a thread voluntarily relinquishes the processor?
🙋
Thread.yield(): Explicitly giving up the processor.Thread.sleep(): Ceasing execution for a specific time.Object.wait(): Waiting for a notification from another thread.