title: The method run() is not running when i start a thread in java
body: <p>i have a class who extends from Thread:</p>
  
  <pre><code>public class Generador extends Thread {
  
  ...
  
  public Generador(int marca, float sleep) {
  
      this.marca = marca;
      this.sleep = sleep;
      this.cantActivaciones = 0;
  }
  
  @Override
  public void start() {
      marcadorAct++;
      cantActivaciones++;
      if (marcadorAct == 3) {
          desalojarPasajero = true;
          marcadorAct = 0;
      } else {
          desalojarPasajero = false;
      }
  }
  
  @Override
  public void run() {
      System.out.println("The thread is running.....");
  }
  </code></pre>
  
  <p>My problem is that the method run() is not working when i use the start() method. Here is my code:</p>
  
  <pre><code>public class Simulación {
  
  ...
  Generador generador[] = new Generador[30]; // Arr of threads...
  
  public Simulación() {   // The constructor
      ....
      for (int i = 0; i &lt; generador.length; i++) {
          generador[i] = new Generador((i + 1) * 1000000, rand.nextInt(3) + rand.nextFloat());
      }
      ....
  }
  
  public void generarPasajero() { // The method who decides to start a thread...
  
      for (int i = 0; i &lt; generador.length; i++) {
              if (!generador[i].isAlive()) {
                  generador[i].start();   // HERE START DOESNT RUN THE RUN() METHOD
                  break;
              }
          }
  }
  </code></pre>
  
  <p>I hope you could understand my problem..
  Anyone can help me with this? Thank you!</p>