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

📄 ex27.java

📁 java编程思想第四版习题答案
💻 JAVA
字号:
// exceptions.Ex27.java
// TIJ4 Chapter Exceptions, Exercise 27, page 500
// Modify Exercise 3 to convert the exception to a Runtime Exception.

public class Ex27 {
	private static int[] ia = new int[2];
	public static void main(String[] args) {
		try {
			ia[2] = 3;
		} catch(ArrayIndexOutOfBoundsException e) { // convert to RuntimeException:
			throw new RuntimeException(e);
		}
	}
}

⌨️ 快捷键说明

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