Code example for FileNotFoundException

0
import java.io.FileNotFoundException;
 
class EmptyChmod implements FileModeMutator { 
    public void chmod(File f, int mode) throws FileNotFoundException {
        if (!f.exists()) {
            throw new FileNotFoundException(String.format("File '%s' does not exist.", f));
        } 
    } 
}