Code example for FutureTask

Methods: run

0
        } 
    }; 
 
    @Override 
    public <V> Future<V> execute(Callable<V> callable) { 
        FutureTask<V> task = new FutureTask<V>(callable); 
 
        task.run(); 
 
        return task; 
    } 
 
    @Override 
    public Future<Void> execute(List<Runnable> runnables) { 
        FutureTask<Void> task = new FutureTask<Void>(EMPTY_CALLABLE); 
 
        for(Runnable runnable : runnables) { 
            runnable.run(); 
        } 
 
        task.run();