As the title says the solution is not correct. There are two problems.
First it should check if the character is not alphanumeric in the while loops. The current solution checks if it is alphanumeric
Second the isAlphaNumeric method is implemented incorrectly.