InterruptedException is thrown if any task cannot be scheduled for execution.
1.True
2.False
3.all of the above
4.none of the above
Mutation testing is a form of ________
1.Black Box Testing
2.Redundancy
3. White Box Testing
4.Loss Testing
NullPointerException is thrown if tasks or any of its elements are null.
1.True
2. False
3.all of the above
4.none of the above
Other than RejectedExecutionException, the execute(Runnable command) function can also throw which exception?
1.Arithmetic
2.ArrayIndexOutOfBounds
3.StringIndexOutOfBounds
4. NullPointerException
The _______ exception can be thrown by the execute(Runnable command) function.
1.Arithmetic
2.ArrayIndexOutOfBounds
3. StringIndexOutOfBounds
4.RejectedExecutionException
The __________ command executes the given command at some time in the future.
1.Execution()
2. execute(Runnable command)
3. scheduleNext()
4. poll()
When a call to tick returns, the executor will be idle.
1. True
2.False
3.all of the above
4.none of the above
____ submits a value-returning task for execution and returns a Future representing the pending results of the task.
1.submit(Callable<T> task)
2. awaitTermination
3.submit(Runnable task, T result)
4.invokeAll()
_____ runs executed commands until there are no commands pending execution.
1.runUntilIdle
2.runPendingCommands
3. execute
4. isIdle
_______ exception is thrown while invokeAll() is interrupted while waiting.
1.InterruptedException
2.NullPointerException
3. RejectedExecutionException
4.ArrayIndexOutOfBoundsException
_______ executes the given tasks, returning the result of one that has completed successfully.
1.isShutdown
2.invokeAny(Collection<? extends Callable<T>> tasks)
3.invokeAll(Collection<? extends Callable<T>> tasks)
4.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
_______ initiates an orderly shutdown in which previously submitted tasks are executed.
1. Shutdown
2.invokeAny(Collection<? extends Callable<T>> tasks)
3. invokeAll(Collection<? extends Callable<T>> tasks)
4.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
_______ returns true if all tasks have completed following shut down.
1.submit(Callable<T> task)
2. isTerminated
3.submit(Runnable task, T result)
4. invokeAll()
_______ runs all commands that are currently pending.
1.runUntilIdle
2.runPendingCommands
3. execute
4. isIdle
_______ runs time forwards by a given duration, executing any commands scheduled for execution during that time period.
1.runUntilIdle
2.runPendingCommands
3. tick
4.isIdle
_______ submits a Runnable task for execution and returns a Future representing that task.
1.submit(Callable<T> task)
2.awaitTermination
3. submit(Runnable task, T result)
4.invokeAll()
________ returns true if this executor has been shut down.
1.isShutdown
2.isTerminated
3. submit(Runnable task, T result)
4.invokeAll()
_________ blocks until all tasks have completed execution after a shutdown request, or the timeout occurs.
1.awaitTermination
2. runPendingCommands
3.tick
4.isIdle
_________ is used for the execution of the given tasks, returning a list of Futures holding their status and results after completion.
1. isShutdown
2. isTerminated
3.invokeAll(Collection<? extends Callable<T>> tasks)
4.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
__________ returns whether this executor is idle.
1.runUntilIdle
2.runPendingCommands
3.execute
4.isIdle