Given the code fragment:
Which code fragment invokes all callable objects in the workers set?
A)
B)
C)
D)
The code fragment in Option C invokes all callable objects in the workers set by using the ExecutorService's invokeAll() method. This method takes a collection of Callable objects and returns a list of Future objects representing the results of the tasks. The other options are incorrect because they either use the wrong method (invokeAny() or submit()) or have syntax errors (missing parentheses or semicolons).Reference:AbstractExecutorService (Java SE 17 & JDK 17) - Oracle
Limited Time Offer
25%
Off
Flo
14 days agoKathrine
15 days agoMerrilee
16 days agoKimberlie
4 days agoJaime
1 months agoYan
1 months agoJess
1 months agoBarabara
1 months agoJeannetta
1 months agoBillye
7 days agoAja
11 days agoDelmy
1 months ago