java.lang.NumberFormatException When I type "Exit"
import java.util.Scanner;
public class ItemsQ2 {
public static void main(String[] args) {
String item = null;
int Iprice = 0;
int total_bill = 0;
do {
System.out.print("Enter Item: ");
Scanner Sitem = new Scanner(System.in);
item = Sitem.nextLine();
String test= item.replaceAll("\\D","");
Iprice = Integer.parseInt(test);
total_bill = Iprice + total_bill;
// System.out.print(test);
System.out.print("Your total bill is: " +total_bill);
} while (!item.equalsIgnoreCase("Exit"));
System.out.print("Your total bill is: " +total_bill);
}
}