75.Java异常处理机制-手动抛出异常

 package testDate;
import java.io.File;
import java.io.FileNotFoundException;
public class TestReadFile {
public static void main(String[] args) {
File f=new File("d:/b.txt");
if(!f.exists()){
try{
//手动抛出异常
throw new FileNotFoundException("File can't be found !");
}catch(FileNotFoundException e){
e.printStackTrace();
}
}
}
}

75.Java异常处理机制-手动抛出异常

上一篇:KDD 2019 | GATNE:一种针对 Multi-Edge 的大规模异构图嵌入模型


下一篇:Files to be needed by importing the android application with eclipse