title: Not equal to in a do while loop
body: <p>For some reason a sentinel value will not work as expected</p>
  
  <pre><code>public static int play() {
          String input;int result;
          do {
          input = JOptionPane.showInputDialog("Do you want to play-Enter 1 if yes , 0 if no");
          result = Integer.parseInt(input);
          } while (result != 1 || result != 0);
          return result;
      }
  </code></pre>
  
  <p>This code above never works but it works just fine if i change the condition from <code>while (result != 1 || result != 0);</code> to <code>while (result &lt; 0 || result &gt; 1);</code></p>
  
  <p>Why is that so and how can i make not equal work in a <code>do...while</code> loop in java ?</p>
  
  <p>Thanks </p>