jUnit MCQ Quiz Hub

Junit Mcq Question Set 4

Choose a topic to test your knowledge and improve your jUnit skills

The __________ command executes the given command at some time in the future.





✅ Correct Answer: 2

The _______ exception can be thrown by the execute(Runnable command) function.





✅ Correct Answer: 4

Other than RejectedExecutionException, the execute(Runnable command) function can also throw which exception?





✅ Correct Answer: 4

_______ runs all commands that are currently pending.





✅ Correct Answer: 2

_____ runs executed commands until there are no commands pending execution.





✅ Correct Answer: 1

__________ returns whether this executor is idle.





✅ Correct Answer: 4

_______ runs time forwards by a given duration, executing any commands scheduled for execution during that time period.





✅ Correct Answer: 3

When a call to tick returns, the executor will be idle.





✅ Correct Answer: 1

_________ blocks until all tasks have completed execution after a shutdown request, or the timeout occurs.





✅ Correct Answer: 1

____ submits a value-returning task for execution and returns a Future representing the pending results of the task.





✅ Correct Answer: 1

_______ submits a Runnable task for execution and returns a Future representing that task.





✅ Correct Answer: 3

_______ returns true if all tasks have completed following shut down.





✅ Correct Answer: 2

________ returns true if this executor has been shut down.





✅ Correct Answer: 1

_________ is used for the execution of the given tasks, returning a list of Futures holding their status and results after completion.





✅ Correct Answer: 3

_______ executes the given tasks, returning the result of one that has completed successfully.





✅ Correct Answer: 2

_______ exception is thrown while invokeAll() is interrupted while waiting.





✅ Correct Answer: 1

NullPointerException is thrown if tasks or any of its elements are null.





✅ Correct Answer: 1

InterruptedException is thrown if any task cannot be scheduled for execution.





✅ Correct Answer: 1

_______ initiates an orderly shutdown in which previously submitted tasks are executed.





✅ Correct Answer: 1

Mutation testing is a form of ________





✅ Correct Answer: 3