Here you can find the source of invokeTask(String threadName, Callable
static <T> Future<T> invokeTask(String threadName, Callable<T> callable)
//package com.java2s; //License from project: Open Source License import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; public class Main { static <T> Future<T> invokeTask(String threadName, Callable<T> callable) { FutureTask<T> task = new FutureTask<T>(callable); Thread t = new Thread(task); t.setName(threadName);// w ww. j ava 2 s . c om t.start(); return task; } }