Coforge interview question

Core java