카테고리 없음

[자바] 예외 던기기 try catch 예문

tomato23 2015. 5. 24. 22:09

public static void main (String[] agr){

try {

System.out.println(9);

System.out.println(10/0);

System.out.println(11);

} catch ( Exception e ){

System.out.println(e.getMessage());

}


반응형