why is thread.join commonly used to stop threads in android
<p>looking at several android examples i see a trend where threads are paused using join() method:</p>

<p>EDIT: please assume that the 2 threads are properly defined. edited the calls to join() </p>

<pre><code>public class MainUI extends Activity{
   private GraphicsViewThread g;
   private BackendDataViewThread b;

   void onCreate(){
      g = new GraphicsViewThread();
      g.start();
      b = new BackendDataViewThread();
      b.start();
   }
   .
   .
   .
   void pauseGame(){
      try {
        g.join();
      }catch (InterruptedException e){
         e.printStackTrace();
      }
      try {
        b.join();
      }catch (InterruptedException e){
         e.printStackTrace();
      }
      GraphicsViewThread = null;
      BackendDataViewThread  = null;
   }
}
</code></pre>

<ol>
<li>which thread does GraphicsViewThread and BackendDataViewThread join to? </li>
<li>what is the need for using join()? can i not set the references immediately to null?</li>
</ol>
