0
      int bookChecked=0;
      int bookReturn=0;
      int bookTotal=0;
      
      while(true) {
        System.out.print("Enter 'R' for a return or 'C' for a checkout: ");
        String bookStatus=sc.nextLine(); 
        if (bookStatus=="R") {
            bookReturn++;
            bookTotal++;
        }
        if(bookStatus=="C") {
            bookChecked++;
            bookTotal++;
        }
        
     
        
        else {
          System.out.println("          Daily Inventory");
          System.out.println("Books returned: " +bookReturn);
          System.out.println("Books checked out:"+bookChecked);
          System.out.println("Total books processed today: "+bookTotal);
    sc.close();
    break;
        }

This is what I have so far. My issue is that on the outputs a "0" will show up. The variables are not counting up. What could I change or add to make the variables count.

0 Answers0