Redo in Java