Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is stop(), suspend(), resume() method?

Answer Posted / kruthi

stop(), suspend() and resume() are the methods used for
thread implementation.
stop() - terminate the thread execution,
Once a thread is stopped, it cannot be restarted with the
start() command, since stop() will terminate the execution
of a thread. Instead you can pause the execution of a
thread with the sleep() method. The thread will sleep for a
certain period of time and then begin executing when the
time limit is reached. But, this is not ideal if the thread
needs to be started when a certain event occurs. In this
case, the suspend() method allows a thread to temporarily
cease executing.
resume() method allows the suspended thread to start again.

Is This Answer Correct ?    77 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of set in java?

1072


How do you find the maximum number from an array without comparing and sorting?

1177


What is time complexity algorithm?

1096


Explain the importance of import keyword in java?

1060


Can a singleton class be inherited?

1012


Why set do not allow duplicates in java?

1185


How do you create a bulleted list?

1308


Define how objects are stored in java?

1117


What are the different access modifiers available in java?

1075


What are the differences between string, stringbuffer and stringbuilder?

1086


What is JDBC Driver interface?How can you retrieve data from the ResultSet

2152


Discuss 2D arrays.

1102


What is array length?

1018


What does .equals do in java?

1171


How do you square a number?

1346