Redo in java