package step3;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
public class Task {
/********* Begin *********/
//请在合适的部位添加代码
public static void main(String[] args) throws FileNotFoundException {
test();
}
public static void test() throws FileNotFoundException {
File file = new File("abc");
if(!file.exists()){ //判断文件是否存在
//文件不存在,则 抛出 文件不存在异常
throw new FileNotFoundException("该文件不存在");
}else{
FileInputStream fs = new FileInputStream(file);
}
}
/********* End *********/
}
摸鱼dba
- 粉丝: 0
- 资源: 30
最新资源
- chromedriver-linux64_116.0.5793.0.zip
- chromedriver-linux64_116.0.5791.0.zip
- chromedriver-linux64_116.0.5794.0.zip
- chromedriver-linux64_116.0.5797.0.zip
- chromedriver-linux64_116.0.5798.0.zip
- chromedriver-linux64_116.0.5803.2.zip
- chromedriver-linux64_116.0.5802.0.zip
- chromedriver-linux64_116.0.5800.0.zip
- chromedriver-linux64_116.0.5805.0.zip
- chromedriver-linux64_116.0.5804.0.zip
- chromedriver-linux64_116.0.5806.0.zip
- chromedriver-linux64_116.0.5808.0.zip
- chromedriver-linux64_116.0.5807.0.zip
- chromedriver-linux64_116.0.5809.2.zip
- chromedriver-linux64_116.0.5812.0.zip
- chromedriver-linux64_116.0.5815.0.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈