Tripadvisor interview question

I was given a code that had a palindrome string in java, from this string you must create a method that ensures the palindrome is indeed the same from back to front.