Home » JAVA Programming » Multithreading » Question
  1. What is the output of this program?
    public class multithreading_Example
    {
    public static void main(String args[])
    {
    Thread thread = Thread.currentThread();
    thread.setName("Thread one");
    System.out.println(thread);
    }
    }
    1. Thread
    2. Thread one
    3. main
    4. Thread[Thread one,5,main]
    5. None of these
Correct Option: D

Thread[Thread one,5,main]



Your comments will be displayed only after manual approval.