title: Unpredictable behavior in Java Thread Pool while capturing response for multiple threads
body: <p>I am trying to add 10 records to different server with the help of thread pool and waiting for response to get the information added on server side, but when I execute the code at my end I am getting same response for few threads, but data stored at server end are unique values per record. </p>
  
  <pre><code>ExecutorService threadPool = Executors.newFixedThreadPool(10); 
  List&lt;Future&lt;Employee&gt;&gt; listOfEmployee = new ArrayList&lt;Future&lt;Employee&gt;&gt;();
  List&lt;Employee&gt; employeeList = new ArrayList&lt;Employee&gt;();
  for(int i=0;i&lt;10;i++)
  {
      listOfEmployee.add(threadPool.submit(new Callable&lt;Employee&gt;() {
          @Override
          public Employee call() 
          {
              return employee.add();
          }
      }));
  }
  threadPool.shutdown();
  threadPool.awaitTermination(100,TimeUnit.MILLISECONDS);
  for(Future&lt;Employee&gt; future : listOfEmployee)
  {
       employeeList.add(future.get());
  }
  </code></pre>
  
  <p>what can be the root cause for the problem?</p>