I've been reading on Generics lately, and I came across this method:
protected <V> RunnableScheduledFuture<V> decorateTask(Callable<V> callable, RunnableScheduledFuture<V> task) {
return new ExceptionHandlingFutureTask<V>(callable, task);
}
You see, I understand why there's a <V> after protected. What I don't understand is why there's a <V> again after RunnableScheduledFuture. I took this particular <V> out of the method, compiled it and there was no error. So why then did the writer decide to put it in there in the first place?