Command Example (2/6)
public boolean doIt() {
try {
oldFile.renameTo(newFile);
} catch (Exception e) {
return false;
}
return true;
}
public boolean undoIt() {
try {
newFile.renameTo(oldFile);
} catch (Exception e) {
return false;
}
return true;
}
}
Previous slide
Next slide
Back to first slide
View graphic version