是一款用JAVA 编写的编译器 具有很强的编译功能

源代码在线查看: uncaughtexception.java

软件大小: 3504 K
上传用户: ac3698
关键词: JAVA 编写 编译器 编译
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*				 * Copyright 1997 Sun Microsystems, Inc.  All Rights Reserved.				 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.				 *				 * This code is free software; you can redistribute it and/or modify it				 * under the terms of the GNU General Public License version 2 only, as				 * published by the Free Software Foundation.				 *				 * This code is distributed in the hope that it will be useful, but WITHOUT				 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or				 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License				 * version 2 for more details (a copy is included in the LICENSE file that				 * accompanied this code).				 *				 * You should have received a copy of the GNU General Public License version				 * 2 along with this work; if not, write to the Free Software Foundation,				 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.				 *				 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,				 * CA 95054 USA or visit www.sun.com if you need additional information or				 * have any questions.				 */								/*				 * @test				 * @bug 4053998				 * @summary Compiler used to not notice the uncaught checked exception.				 * @author turnidge				 *				 * @compile/fail UncaughtException.java				 */								interface I {				    void throwCheckedException ();				}								class A {				    public void throwCheckedException () throws Throwable {				        throw new Throwable();				    }				}								class B extends A implements I {				}								public class UncaughtException {				    public static void main (String[] args) {				    	I b = new B();				        b.throwCheckedException();				    }				}							

相关资源