What is the output? public class Example { public static voi…
What is the output? public class Example { public static void main(String[] args) throws InterruptedException { Thread t = new Thread(() -> { try { Thread.sleep(2000); System.out.println(“Hello”); } catch (InterruptedException e) { System.out.println(“Interrupted”); } }); t.start(); t.join(); System.out.println(“World”); } }
Read Details