how can i kill thread without stop() and destroy()

Answer Posted / ganesh slv

Hey..

{
Thread t = new Thread (this); // or may be in some other ways
t.start (); // starting the thread.

// some codes here

// Now you can stop you thread by assigning null to the
thread

t = null;
}

Is This Answer Correct ?    6 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we make the abstract methods static in java?

587


Is hashset sorted in java?

665


What is annotation in java?

578


What is the difference between hashmap and hashtable? What is an interface?

508


Is linked list a linear or non-linear data structure?

548






What is use of arraylist in java?

581


What is mean by collections in java?

564


What is square root in java?

588


What are java annotations?

646


Is arraylist ordered?

563


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

563


What is an exception in java?

648


What is the difference between stringbuffer and stringbuilder class?

573


Explain about arraylist?

579


What are the restrictions that are applied to the java static methods?

532