Use Command for undo and redo in Java when reversible intent and command history are worth modeling explicitly.
Undo and redo are where Command often proves its value.
Undoable command designs need:
Do not assume every command is naturally undoable. Some operations are irreversible or too expensive to snapshot cleanly. In those cases, forcing undo support into the same command contract can mislead the design.
Command works well for undo only when reversal semantics are real and explicit.