135k views
1 vote
Select an expression to complete the program segment below, which displays an error message and terminates normally if the String variable accountNumber does not contain an integer value.

try
{
int number = Integer.parseInt(accountNumber);
}
catch ( ________________________ )
{
System.out.println("Account number is not an integer value");
}

User Knubo
by
7.8k points

1 Answer

3 votes

Answer:

NumberFormatException

User Sam Morgan
by
8.5k points