Which of the following is true about the output? import java…
Which of the following is true about the output? import java.util.concurrent.*; class MyTask implements Runnable { private int taskId; public MyTask(int id) { this.taskId = id; } public void run() { System.out.println(“Task ” + taskId + ” executed by ” + Thread.currentThread().getName()); try { Thread.sleep(100); } catch (InterruptedException e) {} } } public class Main { public static void main(String[] args) { ExecutorService executor = Executors.newFixedThreadPool(2); for (int i = 1; i