Array Out of Bounds:
I have tested the following code below and have come across some minor issues. The following is to accept input from the user with two exceptions thrown as a result if there is an out-of-bounds and or if the user inputs the wrong substring length. The code must use a substring and a split() method, as well as a loop in the catch exception.
The output is suppose to be as followed if requirements are not met. If the requirements are meet they are displayed:
Enter your full name: Marie Janet
Enter the beginning and ending index number of your lastname: 4 9
Not correct number for extracting your last name.
Enter the beginning and ending index number of your lastname: 42 42
Not correct number for extracting. String index out of range: 42
The following code is attached.
EDIT: Hello Experts the code is here: abound.java