⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 finallyexception.java

📁 高质量Java程序设计 源代码
💻 JAVA
字号:
package net.betterjava.exception.lost;
import java.io.IOException;

public class FinallyException extends Object {

	public FinallyException() {
	}

	private static void throwException() throws IOException, NullPointerException {
		try {
			throw new IOException("a forced exception in try");
		} catch (IndexOutOfBoundsException e) {
		} finally {
			throw new NullPointerException("a forced exception in finally");
		}
	}

	public static void main(String[] args) {
		try {
			throwException();
		} catch (IOException ioe) {
			ioe.printStackTrace(System.out);
		} catch (NullPointerException nulle) {
			nulle.printStackTrace(System.out);
		}
	}
}

⌨️ 快捷键说明

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