LogiQuest
Back to Threads
11

What is the output of the following program?

public class Main {
    public static void main(String[] args) throws Exception {
        var pool = java.util.concurrent.Executors.newSingleThreadExecutor();
        var f = pool.submit(() -> 6 * 7);
        System.out.println(f.get());
        pool.shutdown();
    }
}
Medium

Discussion (0)

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

Log in to join the discussion.