Clario interview question

Flatten an array in java