Get a runnable result

Report a typo

What will be the output of the program below?

ExecutorService executorService = Executors.newSingleThreadExecutor();
Runnable runnable = () -> {
    int returnResult = 5;
};

System.out.println(executorService.submit(runnable).get());
Enter a short text
___

Create a free account to access the full topic