test53.java

来自「SCJP认证考试资料」· Java 代码 · 共 17 行

JAVA
17
字号
class Test53 {
    static class A {
	void process() throws Exception {
	    throw new Exception();
	}
    }
    static class B extends A {
	void process() {
	    System.out.println("B");
	}
    }
    public static void main(String[] args) throws Exception {
	A a = new B();
	a.process();
    }
}

⌨️ 快捷键说明

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