what are depricated methods in threads and explain the
lifecycle methods

Answers were Sorted based on User's Feedback



what are depricated methods in threads and explain the lifecycle methods..

Answer / dara

There are two deprecated methods in threads.
1.resume
2.suspend.
life cycle of methods of thread.
1.ready to run(start() method)
2.run(run() method)
3.suspend(wait() or sleep() method)
4.resume(notify() or notifyall() method)
5.death.

Is This Answer Correct ?    8 Yes 2 No

what are depricated methods in threads and explain the lifecycle methods..

Answer / prerana

The depricated methods in threads are
1. stop
2. suspend
3. Resume

Life cycle of thread
A thread can be only in one of the five states
1. New (Not alive)
2. Runnable (alive)
3. Running
4. Waiting/Blocking/Sleeping
5. Dead

Is This Answer Correct ?    5 Yes 1 No

what are depricated methods in threads and explain the lifecycle methods..

Answer / ravikiran

stop(),suspend(),resume()
start()---will start a new thread of execution nd thread
will be in runnable state
run()-----will run the current thread of execution

Is This Answer Correct ?    3 Yes 2 No

what are depricated methods in threads and explain the lifecycle methods..

Answer / ejp

Good grief. Doesn't anybody read the Javadoc? There are
*six* deprecated methods in java.lang.Thread.

Is This Answer Correct ?    2 Yes 1 No

what are depricated methods in threads and explain the lifecycle methods..

Answer / ravichandra

In threads two ways to create threads.1.by extends the
class
2.implements runnable interface

in threads the following methods are called life cycle
methods

1.start 2.run 3.dead

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Core Java Interview Questions

What are the steps involved to create a bean?

0 Answers  


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

0 Answers  


Is hashmap thread safe?

0 Answers  


What is t in generics in java?

0 Answers  


Can a top level class be private or protected?

0 Answers  






How do you compare two strings? any predefined method for this?

3 Answers  


Differentiate Vector and ArrayList?

6 Answers   Max Telecom, Wipro,


Explain class A{} class B{} class C{} all the three classes are saved in a single file name, what the name should i provide to the file ,in what file name should i run the program? Ple Explain

9 Answers   DNS, Infosys, TCS,


What is the difference between stringbuffer and stringbuilder?

0 Answers  


whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net

0 Answers  


What is sortedmap in java?

0 Answers  


Which sorting algorithm is best in java?

0 Answers  


Categories