LogiQuest
Back to Threads
8

What is the output of the following program?

public class Main {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> System.out.print("worker "));
        t.start();
        t.join();
        System.out.println("main");
    }
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.