HCLTech Interview Question

A java array code question