QA InfoTech Interview Question

Oops Concept,basic java questions,puzzle