Which one of the following methods return a Future object?
replace()
methods declared in the ConcurrentMap interfacenewThread()
method declared in the ThreadFactory interfacesubmit()
methods declared in the ExecutorService interfacecall()
method declared in the Callable interfaceC.
option a) the overloaded replace()
methods declared in the ConcurrentMap interface remove an element from the map and return the success status or the removed value.
option B) the newThread()
is the only method declared in the ThreadFactory interface and it returns a Thread object as the return value.
option C) the ExecutorService interface has overloaded submit()
method that takes a task for execution and returns a Future representing the pending results of the task.
option D) the call()
method declared in Callable interface returns the result of the task it executed.