import java.io.IOException;

public class Poikkeuksia {
    public static Exception t;

    public static void metodi(int i) throws NullPointerException, IOException {
	if (i == 0) {
	    return;
	} else if (i < 0) {
	    throw new IOException("Jotain muuta kummaa");
	} else {
	    throw new NullPointerException("Jotain muuta kummaa");
	}
    }

    public static void main(String[] args) {
	try {
	    metodi(0);
	} catch(NullPointerException e) {
	    System.out.println("Nulli");
	} catch(IOException e) {
	    System.out.println("IO");
	} finally {
	    System.out.println("Aina suoritetaan");
	}
    }
}
