Arimac Digital interview question

The interviewer asked to write a code in java-arrays