System.out.println("Enter UPC for an item you want, enter -1 when done");
do {
    System.out.print("\nEnter a UPC ");
    targetUPC = keyboard.nextLine();
    RetailItem temporary = new RetailItem("Default", 0, 0, targetUPC);
    if(itemList.indexOf(temporary) > -1) {
        RetailItem itemIndex = itemList.get(itemList.indexOf(temporary));
        System.out.println("\n" + itemIndex);
        System.out.print("How many would you like? ");
        numOfItems = keyboard.nextInt();
        itemIndex.setInStock(itemIndex.getInStock() - numOfItems);
        totalCost = numOfItems * itemIndex.getPrice();
    }
    if(itemList.indexOf(temporary) == -1 && !targetUPC.equals("0")) {
        System.out.print(targetUPC + " not found.\n");
    }
Here's some output for it:
Enter UPC for an item you want, enter -1 when done
Enter a UPC: 999
999 not found.
Enter a UPC: 61835
Description: Corn Crisps
Price: $9.45
Number in stock: 35
UPC: 61835
How many would you like? 5
Enter a UPC  not found.                  //Why am I getting this?
Enter a UPC 0
Total cost: $47.25
I've been going through it in my head and can't figure it out
 
     
     
     
    