title: Get random boolean in Java
body: <p>Okay, I implemented this SO question to my code: <a href="https://stackoverflow.com/questions/8878015/return-true-or-false-randomly">Return True or False Randomly</a></p>
  
  <p>But, I have strange behavior: I need to run ten instances simultaneously, where every instance returns true or false just once per run. And surprisingly, no matter what I do, every time i get just <code>false</code></p>
  
  <p>Is there something to improve the method so I can have at least roughly 50% chance to get <code>true</code>?</p>
  
  <hr>
  
  <p>To make it more understandable: I have my application builded to JAR file which is then run via batch command</p>
  
  <pre><code> java -jar my-program.jar
   pause
  </code></pre>
  
  <p>Content of the program - to make it as simple as possible:</p>
  
  <pre><code>public class myProgram{
  
      public static boolean getRandomBoolean() {
          return Math.random() &lt; 0.5;
          // I tried another approaches here, still the same result
      }
  
      public static void main(String[] args) {
          System.out.println(getRandomBoolean());  
      }
  }
  </code></pre>
  
  <p>If I open 10 command lines and run it, I get <code>false</code> as result every time...</p>