title: Java threads - close other threads when first thread completes
body: <p>Folks so my problem is that I have 3 Threads. </p>
  
  <p>1Thread(Bot1)</p>
  
  <pre><code>public class Bot1 implements Runnable {
    String name;
  
    public Bot1(String s) throws Exception{
      ChatterBotFactory factory = new ChatterBotFactory();
      ChatterBot bot1 = factory.create(ChatterBotType.CLEVERBOT);
      ChatterBotSession bot1session = bot1.createSession();
      name=s;
      name=bot1session.think(s);  
    }
  
    public void run(){
      System.out.println("b1: "+name);
    }
  }
  </code></pre>
  
  <p>And the others are same. Only names are <code>Bot2</code> and <code>Bot3</code>. But the code is almost same.
  I need to start these bots at the same time. And I need to display only the sentence that is fastest. Example: if <code>Bot1</code> displayed "Hello" faster than <code>Bot2</code> and <code>Bot3</code>, then I need to close the <code>Bot2</code> and <code>Bot3</code> thread. <strong>But how do I see which one was faster? And which two do I need to close and run my code again?</strong> I hope You understand me and can help me. Thank you and sorry for my bad English.</p>