Update Palindrome.java

Updated the code changes