title: Stopping and removing a task from ScheduledExecutorService
body: <p>I know that I can throw an exception to suppress further executions of task that has been scheduled for repeated execution inside a ScheduledExecutorService (see <a href="https://stackoverflow.com/questions/4909824/stop-a-periodic-task-from-within-the-task-itself-running-in-a-scheduledexecutors">this question</a>). </p>
  
  <p>I also know that I can setRemoveOnCancelPolicy(true) to make sure cancelled tasks are removed from the queue. </p>
  
  <p>My questions are: Is the task actually removed from the scheduler also when I throw an exception from within it? Does this happen by implicitly cancelling the future? If yes, does this mean that setRemoveOnCancelPolicy() also bears on this case?</p>
  
  <p>Couldn't find anything in the Javadocs.</p>