Access over 35 million academic & study documents

Java multithreading

Content type
User Generated
Rating
Showing Page:
1/15

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/15

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/15

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 15 pages?
Access Now
Unformatted Attachment Preview
By Nancy 2015 | By Nancy | CONFIDENTIAL Objective-Day1(1 hour)           Multithreading: What and Why? Life Cycle of a Thread Creating Thread Sleeping a thread Joining a thread Thread Priority Daemon Thread Performing multiple task by multiple thread Garbage Collection Runnable class 2015 | By Nancy | CONFIDENTIAL What is multithreading?  Multithreading is a process of executing multiple threads simultaneously. What is thread?  Thread is a lightweight sub-process or we can say it is a smallest unit of any process. 2015 | By Nancy | CONFIDENTIAL Lifecycle of thread A thread can be in any of following five states...  New  Runnable  Running  Blocked (Waiting)  Terminated (Dead) In Java, lifecycle of a thread is handled by JVM. 2015 | By Nancy | CONFIDENTIAL Lifecycle of thread  New   Runnable   When instance of Thread class created. After calling start() method. Thread scheduler has not selected it to be in running state yet. Running  After calling run() method if thread scheduler selected it to be in running state.  Waiting  Blocked or non runnable state while thread is alive but not running.  Terminated  Dead thread when run() method exits. 2015 | By Nancy | CONFIDENTIAL Create Thread We have two ways to create a thread…  Extending Thread class  Implements Runnable interface 2015 | By Nancy | CONFIDENTIAL Thread Class    Thread class Extends Obj ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Just the thing I needed, saved me a lot of time.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4