FileDocCategorySizeDatePackage
AddException.javaAPI DocExample512Sat Nov 25 12:55:38 GMT 2000None

AddException.java

import java.io.*;

/** 
 * Demo to show what happens if you try to add an exception to a method
 * that its superclass method of the same signature did not have.
 *
 * @author	Ian Darwin
 *
 * @version	1.0
 */
public class AddException {
	/**
	 * Main program, test driver for ThreadsDemo1 class.
	 */
	public static void main(String[] argv) {
		new AddException();
	}

	public void run() {
	}
}

class AddException2 extends AddException {
	public void run() throws IOException {	// COMPILE ERROR EXPECTED
	}
}