title: Is there interrupt handler in java?
body: <p>In C, there is interrupt handler so the programmer can write a specific function for an interrupt. Is there any similar functionality in java? I have to interrupt thread and want to make it do something when interrupted.</p>