QA InfoTech interview question

Oops Concept,basic java questions,puzzle