title: Java while loop works with a netbean error
body: <p>I'm trying to implement a program that needs a loop:</p>
  
  <pre><code>Scanner scan=new Scanner(System.in);
  String word= scan.next().toLowerCase();
  while !(word.equals("mot1") || word.equals("mot2") || word.equals("motmot") || word.equals("motmotmot") ){
  word= word.next().toLowerCase();
  }
  </code></pre>
  
  <p>it works, though, it underlines the while condition with the red error wavelet!!</p>
  
  <p>the error is shown on the left in the margin with an exclamation mark (!) and says 
  '(' expexted
  ')' expected</p>
  
  <p>so i've been trying to put bracket in all senses, the only time it would take the wavelet off is the case when it does not work anymore, and there is an infinite loop!</p>
  
  <p>I don't know why?</p>
  
  <p>Cheers</p>
  
  <p>ADDition:</p>
  
  <p>When the wavelet is off but won't do what intended but the logic is here:</p>
  
  <pre><code> String word= scan.next().toLowerCase();
             while (!word.equals("onetime") || !word.equals("daily") || !word.equals("weekly") || !word.equals("monthly") ){
  
  }
  </code></pre>