Atos-Syntel interview question

Asked to write a Java palindrome program.