What is a thread in java ?

Posted by Unknown Senin, 03 Juni 2013 0 komentar
see more post :
Non Runnable States in Multithreading - Different states while thread is in runnable states

A thread is a lightweight process.While dealing with one thread called single thread and with more thread called multi thread.

Main Thread :
                     
When a standalone application is running it is in main thread. What created inside is called  child thread.

Life Cycle Of Thread or States Of Thread :
     
           New State:
                       
When it is created and is when the thread is not alive ie, before start( ).

           Runnable (ready to run) State:
                        
After invoking start( ) it goes to runnable state.
                        Can return to this state after running, waiting, sleeping or back from blocked state.

           Running State:
                        
This state is at executing state.
         
           Dead State:
                        
This state begins when run( ) methods completes, from here it will never run again.

           Blocked State:
                        
A thread can enter in this state because of waiting the resources that are hold by another
                        thread.                            


TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: What is a thread in java ?
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke http://androidpopuler.blogspot.com/2013/06/what-is-thread-in-java.html. Terima kasih sudah singgah membaca artikel ini.

0 komentar:

Posting Komentar

Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.