Infosys Interview Question

Technical question on java and some real time examples