Here you can find the source of execute(Runnable command)
public synchronized static void execute(Runnable command)
//package com.java2s; //License from project: BSD License import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; public class Main { public static int DefaultThreads = 8; private static ThreadPoolExecutor defaultEs; public synchronized static void execute(Runnable command) { if (defaultEs == null) defaultEs = newExecutor(DefaultThreads); defaultEs.execute(command);// w ww . java 2 s . c o m } public static ThreadPoolExecutor newExecutor(int nThreads) { return (ThreadPoolExecutor) Executors.newFixedThreadPool(nThreads); } }