Pergunta de entrevista da empresa Pearson

Palindrome Java question and explain the code lines one by one.