Leetcode Check Palindrome Java