Frage im Vorstellungsgespräch bei Pearson

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