¿¹Á¦

public static void main( String[] args ) {
int number = 0;
try {
number = Integer.parseInt( args[ 0 ] );
} finally {
System.out.println( "finally clause" ); //$NON-NLS-1$
if ( number == 0 ) {
throw new IllegalArgumentException( "Bad argument" ); //$NON-NLS-1$
}
}
}

¼Ö·ç¼Ç
throw ¹®À» finally ºí·Ï ¿ÜºÎ·Î À̵¿ÇϽʽÿÀ.

public static void main( String[] args ) {
int number = 0;
try {
number = Integer.parseInt( args[ 0 ] );
} finally {
System.out.println( "finally clause" ); //$NON-NLS-1$
}

if ( number == 0 ) {
throw new IllegalArgumentException( "Bad argument" ); //$NON-NLS-1$
}
}