Java: Palindrome (Using methods)