title: How do I make concurrently running threads?
body: <p>I want to have two separate threads running two different instances of different classes and I want them to execute the run command at the same time.</p>
  
  <p>I've made a practice class to demonstrate the problem I'm having.
  One racer counts forwards, the other counts backwards.</p>
  
  <pre><code>public class testCount {
  
      public static void main(String args[]) {
          testCount countCompetition = new testCount();
          countCompetition.run();
      }
  
      public void run() {
          (new Thread(new racer1())).start();
          (new Thread(new racer2())).start();
      }
  
      public class racer1 implements Runnable {
          public void run() {
              for(int x = 0; x &lt; 100; x++) {
                  System.out.println(x);
              }
          }
      }
      public class racer2 implements Runnable {
          public void run() {
              for(int y = 100; y &gt; 0; y--) {
                  System.out.println(y);
              }
          }
      }
  }
  </code></pre>
  
  <p>My results</p>
  
  <pre><code>1
  2
  ... All the way to 100
  100
  100
  99
  ... All the way back down
  1
  </code></pre>
  
  <p>What I want</p>
  
  <pre><code>1
  100
  2
  99
  3
  98
  </code></pre>
  
  <p>They don't need to be taking turns like that, but they do need to be working at the same time, instead of one after the other.
  Any hints, advice or code snippets would be greatly appreciated.</p>