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



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

Answer / 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

More Core Java Interview Questions

What is serializable interface?

13 Answers   Infosys, Probity Soft, Seed Infotech,


What is a bufferedreader?

0 Answers  


What is the difference between equals() and == in java?

0 Answers  


What is the generic class?

0 Answers  


Does java map allow duplicates?

0 Answers  






What is the advantage of preparedstatement over statement?

0 Answers  


What is hard code & soft code?

7 Answers   Cognizant, Wipro,


Is passing by reference faster?

0 Answers  


What are the 8 primitive data types in java?

0 Answers  


Explain the meaning of java applet.

0 Answers   TCS,


Describe different states of a thread.

0 Answers  


What is an anonymous class?

1 Answers   IBM,


Categories