quiz

Full-stack dev quiz question #46

Full-stack dev quiz question #46split tasks

Questions about parallelism in Java are very popular on job interviews. I have one for you today. Check forty sixth question of full-stack dev quiz to check if you know parallelism in Java well enough.

ExecutorService from JDK has a method invokeAll that gets a collection of Callable tasks. What that method does? Choose one the best answer.

  1. starts executing the tasks,
  2. queues the tasks for execution,
  3. executes the tasks and waits for them to complete,
  4. wakes up all sleeping threads,
  5. cancels sleep operations if any is being executed at the moment,

For the correct answer scroll down

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answer is: c. For more information read ExecutorService - how to complete a task by multiple threads in Java.

If you like what I do, consider buying me a coffee :)

Buy me a coffeeBuy me a coffee