The code below should print the last character in the string inputString. However, this code contains a certain number of mistakes, and it also throws StringIndexOutOfBoundsException.
Fix the code below so that it prints the last character in the string inputString and doesn't throw an exception.