mainexception26.java

来自「Thinking In Java 原文章」· Java 代码 · 共 14 行

JAVA
14
字号
// exceptions/MainException26.java
import java.io.*;

public class MainException26 {
	// Pass all exceptions to the console:
	public static void main(String[] args) throws Exception {
		// Leads to FileNotFoundException:
		FileInputStream file =
			new FileInputStream("null.jv");
		// Use the file ...
		// Close the file:
		file.close();
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?