title: java System.out missing out
body: <p>The output of the following simple code is a little odd to me.
  it miss out some of the numbers between 0 and 100 to print on the console.</p>
  
  <p>could anyone explain why it omit to print? i am completely new to concurrency programming.</p>
  
  <pre><code>import java.util.concurrent.ExecutorService;
  import java.util.concurrent.Executors;
  
  import org.junit.Test;
  
  
  public class SimpleTest {
  
      @Test
      public void testSimple() throws Exception {
          ExecutorService executorService = Executors.newFixedThreadPool(10);
  
          for(int i = 0; i &lt;= 100; i++) {
              executorService.execute(new SimpleRunnable(i));
          }
  
          executorService.shutdown();
      }
  
  }
  
  class SimpleRunnable implements Runnable {
  
      int i;
  
      public SimpleRunnable(int i) {
          this.i = i;
      }
  
      public void run() {
          synchronized(System.out) {
              System.out.println(i);
          }
      }
  
  }
  </code></pre>