Tech Mahindra interview question

Core Java concepts