title: Will ExecutorService block the method it lies in?
body: <p>I am a newbie in Java and I know my question may be silly... I found that my main method is prevented from returning by the ExecutorService if I do not invoke ExecutorService.shutdown():</p>
  
  <pre><code>class Test{
      public static void main(String[] args){
          ExecutorService exec = new Executors.newCachedThreadPool();
          exec.execute(new Runnable(){
              public void run(){
                  System.out.println("I am running!");
              }
          });
      }
  }
  </code></pre>
  
  <p>The code above will not return in the main thread.
  I wonder why the ExecutorService keeps blocking the main method, does it aim at forcing the programmer to invoke shutdown()?</p>