HCLTech interview question

Oops concepts