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

Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target

7 Answers   Infosys, WW,


Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

0 Answers  


What package is math in java?

0 Answers  


What do you mean by platform independence?

0 Answers  


What is a finally block? Is there a case when finally will not execute?

0 Answers  






Is there is any difference between a scrollbar and a scrollpane?

0 Answers  


Explain public static void main(string args[]) in java.

0 Answers  


Difference between hashCode() & equals()?

3 Answers   HCL,


What is the most important feature of java? What is an interface?

0 Answers  


What do you understand by weak reference?

0 Answers  


Is age a discrete variable?

0 Answers  


When should you use arraylist and when should you use linkedlist?

0 Answers  


Categories