title: Sharing a variable between multiple different threads
body: <p>I want to share a variable between multiple threads like this:</p>
  
  <pre><code>boolean flag = true;
  T1 main = new T1();
  T2 help = new T2();
  main.start();
  help.start();
  </code></pre>
  
  <p>I'd like to share <code>flag</code> between main and help thread where these are two different Java classes I've created. Is any way to do this? Thanks! </p>