Infosys Solutions interview question

regarding java