Method named process

Report a typo

Here's a code that invokes a method named process. The method throws an IllegalArgumentException if the input string is either null or empty.

What does the following code print?

try {
    process("");
} catch (NumberFormatException e) {
    System.out.println("NumberFormatException");
} catch (RuntimeException e) {
    System.out.println("RuntimeException");
} catch (Exception e) {
    System.out.println("Exception");
}
Select one option from the list
___

Create a free account to access the full topic