title: Infinite while loop with break statement
body: <p>I am a beginner and I was analyzing this java code:</p>
  
  <pre><code>// t is a thread running
  while (true) {
      try {
          t.join(); 
      } catch (InterruptedException e) { e.printStackTrace(); }
      break;
  }
  t=null;
  </code></pre>
  
  <p>What I am asking is: is there a need to put that inside an infinite loop? Because as I see the loop will run only once i.e due to that break statement. I need some explanation please.</p>