Suppose you have an instance of ExecutorService.
val executor: ExecutorService = Executors.newSingleThreadExecutor()The main thread supplies two tasks to it:
val task: Runnable = Runnable {
try {
TimeUnit.MILLISECONDS.sleep(1000)
println("Hello!")
} catch (e: Exception) {
println(e.stackTraceToString())
}
}
executor.submit(task)
executor.submit(task)
Select all correct statements: