title: How can I compare a string using or ||...
body: <p>//I need the while loop to break when the user types y OR n.. but so far I can only get it for one letter/string. </p>
  
  <pre><code>Scanner user_input = new Scanner(System.in);
  String name = user_input.next();
  System.out.print("Would you like to order some coffee, "+name+"? (y/n)");
  String coffeeYorN = user_input.next();
  
    while (!coffeeYorN.equals("y")||!coffeeYorN.equals"n")  //HERE IS MY ISSUE
    {
      System.out.println("Invalid response, try again.");
      System.out.print("Would you like to order some coffee, "+name+"? (y/n)");
       coffeeYorN = user_input.next();
    }
  </code></pre>