Rakuten interview question

Java program reverse, palindrome array