title: Is it possible to call Thread start() and join() in a single call?
body: <p>I'm playing with threads in Java and i have a question about the join() method.
  Let's say i have a SampleClass that extends Thread. I instantiate some new threads in the main but i want the thread's job to be completed sequentially using join().</p>
  
  <pre><code>public static void main(String[] args) {
      for(int i=0; i&lt;5; i++){
          new SampleClass().start();
      }
  }
  </code></pre>
  
  <p>Is it possible to call immediately join()? ...something like this:</p>
  
  <pre><code>new SampleClass().start().join();
  </code></pre>
  
  <p>Or is there another approach to use? ...like this maybe:</p>
  
  <pre><code>new SampleClass().start();
  try{Thread.currentThread().join();}catch(InterruptedException e){...}
  </code></pre>
  
  <p>Thank you very much</p>