PoolThread { public void cachedThreadPool() { ExecutorService pool = Executors.newCachedThreadPool(); for (int i = 0; i < 5; i++) { pool.execute(getThread(i + "")); } pool.execute(getThread("6")); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } pool.execute(getThread("7")); pool.shutdown(); }  static void main(String[] args); void cachedThreadPool(); void fixedThread(); void singleThread(); void schelThread(); void await(); Thread getThread(final String name); Thread getSingleThread(final String name); Thread getSleepThread(final String name);  }
@Test public void testCachedThreadPool() throws Exception { PoolThread pt = new PoolThread(); pt.cachedThreadPool(); }