Fresher interview question

Write palindrome program in java?