Tech Mahindra interview question

oops concepts and jsp things