What is the output of the following program? public class De…
What is the output of the following program? public class Demo extends Thread { public void run() { try { System.out.println(“Thread started”); Thread.sleep(1000); System.out.println(“Thread resumed”); } catch (InterruptedException e) { System.out.println(“Interrupted”); } } public static void main(String[] args) { Demo t = new Demo(); t.start(); t.interrupt(); } }
Read Details