Infosys interview question

Core java and oops concepts