Capgemini Interview Question

One Java coding on array and basic Java concepts