Trying to cancel

Report a typo

You have the following snippet:

fun main() {
    val executor: ExecutorService = Executors.newSingleThreadExecutor()

    val future = executor.submit(
        Callable {
            Callable {
                100 + 100
            }
        }
    )

    future.cancel(true)
    println(future.get())
    executor.shutdown()
}

What will the code print?

Select one option from the list
___

Create a free account to access the full topic