title: How can I check if two strings are NOT equal to each other?
body: <p>I was completing a high school java project, but I stumbled across this issue that I can't seem to fix no matter what I do.</p>
  <pre><code>do  //runs until user enters a valid option
              {
                  understood = input.next();  //collects user input 
                  if (!understood.equalsIgnoreCase(&quot;yes&quot;) || !understood.equalsIgnoreCase(&quot;y&quot;) || !understood.equalsIgnoreCase(&quot;no&quot;) || !understood.equalsIgnoreCase(&quot;n&quot;))
                                  {
                      System.out.print(&quot;\nHey, man. Answer the question. Yes or no? &quot;);
                  }
              }
              while (!understood.equalsIgnoreCase(&quot;yes&quot;) || !understood.equalsIgnoreCase(&quot;y&quot;) || !understood.equalsIgnoreCase(&quot;no&quot;) || !understood.equalsIgnoreCase(&quot;n&quot;));
  </code></pre>
  <p>What I'm trying to do is check for invalid input for a string in a yes or no question, but when I run it, no matter what I enter, it is treated as invalid input. I'd really appreciate any help on this, thank you so much! :)</p>