What is the function of the boolean cancel(boolean mayInterruptIfRunning) method of the Future interface?
Answer: Tries to cancel the execution of the thread; returns true if successful, but returns false in the case the thread finished normally by the time the method was called.
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.