Bloomberg Interview Question

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