title: add multiple object to ArrayList using for looping java
body: <p>I try to add multiple object in ArrayList, this is my code</p>
  
  <pre><code>ArrayList&lt;WordData&gt; unique = new ArrayList&lt;WordData&gt;();
  WordData tempWordData = new WordData(); 
  
          for(int i=0;i&lt;3;i++)
          {
              String temp_word = word.get(i);
              tempWordData.addWord(temp_word);
              unique.add(tempWordData);               
          }
  </code></pre>
  
  <p>but, all the data in <code>unique</code> <code>ArrayList</code> was <code>word.get(2)</code>, not <code>word.get(0), word.get(1), word.get(2)</code></p>
  
  <p>Please help, thanks</p>