HCLTech interview question

A java array code question