-
What is the output of the thread in output of this program?
public class Output
{
public static void main(String args[])
{
Thread thread = Thread.currentThread();
System.out.println(thread.isAlive());
}
}
-
- True
- 0
- 1
- False
- None of these
Correct Option: A
Thread t is seeded to currently program, hence when you run the program the thread becomes active & code ‘thread.isAlive’ returns true.