Arimac Digital Interview Question

The interviewer asked to write a code in java-arrays