Any difference among Executors.newSingleThreadExecutor() and Executors.newFixedThreadPool(1)
<p>I was wondering, what is the difference among <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Executors.html#newSingleThreadExecutor%28%29" rel="nofollow">Executors.newSingleThreadExecutor()</a> and <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool%28int%29" rel="nofollow">Executors.newFixedThreadPool(1)</a></p>

<p>The below is picked from javadoc</p>

<blockquote>
  <p>Unlike the otherwise equivalent
  newFixedThreadPool(1) the returned
  executor is guaranteed not to be
  reconfigurable to use additional
  threads.</p>
</blockquote>

<p>I try the following code below, seems no difference.</p>

<pre><code>package javaapplication5;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author yan-cheng.cheok
 */
public class Main {
    public static void main(String[] args) {
        new Main();
    }

    public Main() {
        //ExecutorService threadExecutor = Executors.newSingleThreadExecutor();
        ExecutorService threadExecutor = Executors.newFixedThreadPool(1);
        threadExecutor.submit(new BadTask());
        threadExecutor.submit(new Task());      
    }

    class BadTask implements Runnable {
        public void run() {
            throw new RuntimeException();
        }
    }

    class Task implements Runnable {
        public void run() {
            for (int i = 0; i &lt; 100; i++) {
                System.out.println("[LIVE]");
                try {
                    Thread.sleep(200);
                } catch (InterruptedException ex) {
                    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
    }
}
</code></pre>

<p>Most probably something wrong with my understanding :)</p>
