MindGate Solutions interview question

Oops Concept. Basic of java