title: What are multi-threading DOs and DONTs?
body: <p>I am applying my new found knowledge of threading everywhere and getting lots of surprises</p>
  
  <p>Example:<br /></p>
  
  <blockquote>
    <p>I used threads to add numbers in an
    array. And outcome was different every
    time. The problem was that all of my
    threads were updating the same
    variable and were not synchronized.</p>
  </blockquote>
  
  <ul>
  <li>What are some known thread issues?</li>
  <li>What care should be taken while using
  threads?</li>
  <li>What are good multithreading resources.</li>
  <li>Please provide examples.</li>
  </ul>
  
  <p>sidenote:<br />(I renamed my program <code>thread_add.java</code> to <code>thread_random_number_generator.java</code>:-)</p>