Question: What print after the thread end? public class Quiz { public static void main(String[] args) { new Thread(new Task1()).start(); System.out.print(1); } } class Task1 implements

What print after the thread end? public class Quiz \{ public static void main(String[] args) \{ new Thread(new Task1()).start(); System.out.print(1); \} \} class Task1 implements Runnable \{ @Override public void run() \{ int count =3 int answer =1 while (count > 0) \{ try{ Thread.sleep(1000); \} catch (InterruptedException e) \{ e.printStackTrace(); \} count--; answer++; \} System.out.print(answer); \} \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
