Capgemini interview question

One Java coding on array and basic Java concepts