Infosys interview question

Oops concepts from core Java and spring Boot