Public feed #380933

Miscellany

public java v1 · immutable
Raw Edit
·published 2007-03-04 14:16 UTC
rendered paste body
--- Klass.java ---------------------------------------------public class Klass implements Iface {	public String getInputText(boolean doit) throws InputNotProvidedException {		if (doit)			throw new InputNotProvidedException();				return "was auch immer";	}		public static void main(String[] args) {		Klass klass = new Klass();				try {			klass.getInputText(false);			klass.getInputText(true);		}		catch (InputNotProvidedException ex) {		}	}}--- Iface.java ---------------------------------------------------public interface Iface {	public String getInputText(boolean doit) throws InputNotProvidedException;}--- InputNotProvidedException.java -------------------------------------public class InputNotProvidedException extends Exception {	private static final long serialVersionUID = 1L;}