title: What does " StringBuilders are not thread-safe" mean?
body: <p>I have read some articles about the pros and cons of <code>String</code> and <code>StringBuilder</code> in the Java Programming language. In one of the articles, the author mentioned that:</p>
  
  <blockquote>
    <p><strong>StringBuilder</strong> is not <em>Thread-safe</em>, so in <em>multiple threads</em> use
    <strong>StringBuffer</strong>.</p>
  </blockquote>
  
  <p>Unfortunately, I cannot understand what it means. Could you please explain the difference between <code>String</code>, <code>StringBuilder</code> and <code>StringBuffer</code> especially in the context of "Thread safety".</p>
  
  <p>I would appreciate it if you could describe with the code example.</p>