Executorservice
public interface ExecutorService extends Executor
An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.
The following example includes two classes. PrintTask.java creates threads that sleep for a random time (0-5 secs). RunnableTester.java executes the PrintTask threads using a fixed thread pool.