Pregunta de entrevista de Cognizant

asked to make palindrome code in java