title: Else statement executing when loop exit condition is met
body: <p>So I have this while loop and I want to exit the loop by the user entering q or Q, and if the user enters any other letter I want the program to output “please try again”. </p>
  
  <p>As it is right now my program does stop when the user enters q but it also prints "please try again".  I realize this is because when the user enters ‘q’, userChoice does equal something other than those choices but I’m not sure how to change it so when the program exits it exits without saying "please try again".</p>
  
  <p>I just ran the program again and realized the loop actually does not end when i enter q or Q</p>
  
  <pre><code>public void processTransactions()
      {
          Scanner sc = new Scanner(System.in).useDelimiter("\n");
          userChoice = "x";
           while(!userChoice.equals("q") || (!userChoice.equals("Q")))
          {
           System.out.println("Welcome to the Amazon listings.");
           System.out.println(" ");
           System.out.println("Enter \"A\" to add item");
           System.out.println("Enter \"F\" to find an Item");
           System.out.println("Enter \"D\" to delete an Item");
           System.out.println("Enter \"S\" to show all Items in the catalog");
           System.out.println("Enter \"Q\" to quit");
           userChoice = sc.next();
           if((userChoice.equals("A") ) || (userChoice.equals("a"))){
                  System.out.println("What type of Item do you want to add?");
                  type = sc.next();
                  System.out.println("Please enter the Item number");
                  itemNum = sc.nextInt();
                  //title does not work with spaces for some reason
                  System.out.println("Please enter the title");
                  title = sc.next();
                  System.out.println("Please enter the price");
                  price = sc.nextDouble();
               if((type.equals("Book")) || (type.equals("book"))){
                   System.out.println("Please enter the authors name");
                   author = sc.next();
                   Book newItem = new Book(this.itemNum, this.title, this.price, this.author);
                   this.cat.addItem(newItem);
                   System.out.println("New book added to catalog");
                   System.out.println(" ");
                  }
               if((type.equals("Movie")) || (type.equals("movie"))){
                   System.out.println("Please enter the name of the movie star");
                   star = sc.next();
                   Movie newItem = new Movie(this.itemNum, this.title, this.price, this.star);
                   this.cat.addItem(newItem);
                   System.out.println("New Movie added to catalog");
                   System.out.println(" ");
                  }
               if((type.equals("Music")) || (type.equals("music"))){
                   System.out.println("Please enter the name of the artist");
                   artist = sc.next();
                   Music newItem = new Music(this.itemNum, this.title, this.price, this.artist);
                   this.cat.addItem(newItem);
                   System.out.println("New music added to catalog");
                   System.out.println(" ");
                  }
               if((userChoice.equals("Q")) || (userChoice.equals("q"))){
                 break;
               }
          }
          else if((userChoice.equals("S")) || (userChoice.equals("s"))){
              this.cat.printList();
          }
          else if((userChoice.equals("F")) || (userChoice.equals("f"))){
              System.out.println("Enter the item number of the item you wish to find");
              itemNum = sc.nextInt();
              Item item = this.cat.find(itemNum);
              if(item != null){
                  System.out.println(item.toString());
              }
              else{
                  System.out.println("not found");
              }
          }
          else if ((userChoice.equals("D")) || (userChoice.equals("d"))){
              System.out.println("Enter the item number of the item you wish to delete");
              itemNum = sc.nextInt();
              Item item = this.cat.find(itemNum);
              if(item != null){
                  this.cat.remItem(item);
                  System.out.println("Item Removed");
  
              }
              else{
                  System.out.println("not found");
              }
          }
  
  
          else 
         {
              System.out.println("please try again");
         }
       }
  </code></pre>