public class ExceptionTest07{
	
	public static void main(String[] args){
		
		try{
			
			FileInputStream fis = new FileInputStream("c:/abc.txt");
			
			//JVM为我们执行了一下这段代码
			//FileNotFoundException e = new FileNotFoundException("c:\abc.txt (系统找不到指定的文件。)");
			
		}catch(FileNotFoundException e){
			
			//打印异常堆栈信息.
			//一般情况下都会使用该方式去调试程序.
			//e.printStackTrace();
			
			/*
			java.io.FileNotFoundException: c:\abc.txt (系统找不到指定的文件。)
		        at java.io.FileInputStream.open(Native Method)
		        at java.io.FileInputStream.<init>(FileInputStream.java:106)
		        at java.io.FileInputStream.<init>(FileInputStream.java:66)
		        at ExceptionTest07.main(ExceptionTest07.java:13)
        */
        
        String msg = e.getMessage();//e.getMassage的来源于JVM为我们执行了一下这段代码,FileNotFoundException e = new FileNotFoundException("c:\abc.txt (系统找不到指定的文件。)");
        
        System.out.println(msg); //c:\abc.txt (系统找不到指定的文件。)
        
			
		}
		
		//这段代码会执行.
		System.out.println("ABC");
		
	}
}