Pergunta de entrevista da empresa Bloomberg

In c++, how to implement "finally" block in java