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.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.