Collecting Callables

Report a typo

You have the following snippet:

import java.util.concurrent.*

fun main() {
    val executor = Executors.newFixedThreadPool(4)

    val callables = listOf(
        Callable { 10 },
        Callable { 20 },
        Callable { 30 }
    )

    val result = executor.invokeAny(callables)
 
    executor.shutdown()
}

What does the variable result contain?

Select one option from the list
___

Create a free account to access the full topic