Home | Login | Blog | Forum | Download | RSS Feed | Ajax | Hello-World | J2EE | BPM | EJB | FileNet | Hibernate | ORM | IBM | ILOG | Interview | FAQs |

Java | Apache | JVM | Others | BRMS | Oracle | Pega | SOA | Sun-Certification | Web-Service | websphere | XML |
 

JAVA DEVELOPER SITE - COMPLETE JAVA TUTORIALS

Uses of Class java.lang.Thread & Methods Defined in java.lang.Thread


Share
 
 

Useful Java Links


       


Some Important Methods defined in java.lang.Thread are shown in the table:

1.    Thread currentThread( ) : Returns an object reference to the thread in which it is invoked.

 

2.    String  getName( )  :Retrieve the name of the thread object or instance.

 

3.      void  start( ) :Start the thread by calling its run method.

 

4.    void  run( )  :This method is the entry point to execute thread, like the main method for applications.

 

5.      void  sleep( ):Suspends a thread for a specified amount of time (in milliseconds).

 

6.    boolean  isAlive( ) : This method is used to determine the thread is running or not.

 

7.    int  activeCount( ) :This method returns the number of active threads in a particular thread group and all its subgroups.

 

8.      void  interrupt( ) :The method interrupt the threads on which it is invoked.

 

9.    void  yield( ) :By invoking this method the current thread pause its execution temporarily and allow other threads to execute.

 

10.  void  join( ) :This method and  join(long millisec) Throws InterruptedException. These two methods are invoked on a thread. These are not returned until either the thread has completed or it is timed out respectively.

 

A thread in Java can be created in 2 ways. Read More:

 

Program to create multiple threads using Thread class

Program to create multiple threads using Runnable interface




Download Latest Java/J2EE eBooks, SCJP Dumps, SCWCD Dumps, Pega Tutorial, IBM WebSphere BPM tutorials and many more


If you need any urgent assistance on methods-defined-in-java-thread-class, kindly email your requirement to us at : info@javagenious.com or Contact-an-Expert. Our experts will try their best to solve your problem.

You can also subscribe to our newsletters on methods-defined-in-java-thread-class, to receive updates on methods-defined-in-java-thread-class,via email.Enter you email below:

Enter your email address:

Delivered by FeedBurner



Keyword Tags: methods-defined-in-java-thread-class tutorial,methods-defined-in-java-thread-class in java,Concepts of methods-defined-in-java-thread-class,Java,J2EE,Interview Questions,methods-defined-in-java-thread-class Examples


Comments:


Post Your Comment:

*

Yes, I would like to recieve email notifications on my reply.

Popular Posts:

 
Popular Downloads

SCJP 1.6 Dumps
JSP Interview Questions
Struts Interview Questions
Hibernate Interview Questions
SCWCD Dumps
SCBCD Dumps

Java/J2EE Tutorial
JMS Tutorials
seam richfaces tutorial
richfaces live demo
jquery example demo
JQuery Tutorial and Source Code
JSF Tutorial
XSL Tutorial
J2EE JMS
CORBA Applications
Java CERTIFICATION
SCJP 1.5
SCJP 1.6
SCWCD 1.5
SCBCD
Mis
Ajax autosuggest autocomplete from database
Struts forms and validation with webflow
Java Apache POI Examples
JDBC Tutorial
Oracle 9i & 10g
MYSQL Tutorial
php Tutorial
JQuery Examples
Upload Java File
JAXB Examples
PL-SQL Tutorial
Dojo AJAX
EJB Examples
Java IDE
Eclipse
NetBeans
IBM Rational Weblogic Workshop
Downloads
SCJP 1.6 Dumps
SCJP 1.5 DUMP
SCJP Material
SCWCD
Java Security
SCBCD Dumps
External Links
SUN Java
JOracle
IBM
PHP Certification
Technical Interview Questions
Amazon Interview Questions
Google Interview Questions
Microsoft Interview Questions
IBM Interview Questions
Yahoo Interview Questions
All Tutorials
php mysql tutorial
SCJP 1.5/1.6
SCWCD 1.5/1.6
Polymorphism
Thread Tutorial
Generics & Exceptions
Spring Struts Hibernate
Java Collections
MAP
SET
LIST
VECTOR
Advanced Java
Stateless Session Bean
Introduction to EJB
Stateful Session Bean
Java Design Patterns
HOME | FORUM | ABOUT | BLOGS | CONTACT-US