¿¹Á¦

public static class Loader {
public void load() throws UnsupportedOperationException, ClassNotFoundException {}
}


public static void main(String[] args) {
Loader loader = new Loader();
try {
loader.load();
} catch ( Exception e ) {
e.printStackTrace();
}
}

¼Ö·ç¼Ç
°¢ ¿¹¿Ü¿¡ ´ëÇØ throws Àý¿¡¼­ ¼±¾ðµÇ´Â Àü¿ë catch ÀýÀ» ÀÛ¼ºÇϽʽÿÀ.

public static class Loader {
public void load() throws UnsupportedOperationException, ClassNotFoundException {}
}


public static void main(String[] args) {
Loader loader = new Loader();
try {
loader.load();
} catch ( UnsupportedOperationException e1 ) {
System.out.println( "load is not implemented" ); //$NON-NLS-1$
} catch ( ClassNotFoundException e2 ) {
System.out.println( "No class " + e2.getMessage() ); //$NON-NLS-1$
}
}