Exception Handling for Letters/Alphabets
Excuse me if the question sounds silly: about - exception handling.
I understand that there is "NumberFormatException" in order to catch exceptions for integers. Is there something like that available for letters or alphabets? I mean, if in an integer field if I enter an alphabet I can catch this with :
System.out.println ("Enter a number")
value= new Integer(keyboardInput.readLine()).intValue();
catch (NumberFormatException nfe)
System.out.println("\n That was not an integer, Please try again.");
Is there something like this available to catch when a number is entered for a name fields or if it is left blank.
I appreciate any suggestions.