Javatpoint Logo

Explain yield(),sleep() and stop() methods of a thread.

By: Rakesh*** On: Fri May 12 19:43:58 IST 2017     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
Please let me the answer Up0Down

 
Image Created0Down

By: [email protected] On: Fri May 12 19:45:51 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 

1. stop() methods kills the thread is on executation or ready satge for parmanent.

2. sleep() methods will put the job to be in waiting steps for some instance of time while another job will execute on the processor.

3. yield() methods pause the current theard and execute the another thread which is waiting to be execute in ready stage which has same or less priority as compare to running thread.
Image Created0Down

By: [email protected] On: Mon Jun 12 15:45:17 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No