Infosys Interview Question

java code to test if a string is a palindrome