if (liquidInOunces > 1000000000) {
//Display error message.
System.out.println("Amount must not exceed 1,000,000,000.");
return;
If i use a 10 digit number it displays the error message as wanted. If i use a number over 10 digits i get a java error. I need this to display the error message no matter how long the user input is.