¿¹Á¦

public static class ClassA throws NullPointerException {
public void methodA {

throw new NullPointerException();
}

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

public static class ClassA throws Error {
public void methodA {

throw new Error();
}