SysArc Infomatix Interview Question

how to handle events in Java