문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
study:java:javachobo:ch8 [2010/02/15 15:45] gauryan |
study:java:javachobo:ch8 [2010/02/15 15:47] gauryan |
||
---|---|---|---|
줄 53: | 줄 53: | ||
| | ||
for( int i = 0 ; i < 10 ; ++i ) { | for( int i = 0 ; i < 10 ; ++i ) { | ||
- | result = number / (int)(Math.random() | + | result = number / (int)(Math.random() |
System.out.println(result); | System.out.println(result); | ||
} | } | ||
줄 68: | 줄 68: | ||
for( int i = 0 ; i < 10 ; ++i ) { | for( int i = 0 ; i < 10 ; ++i ) { | ||
try { | try { | ||
- | result = number / (int)(Math.random() | + | result = number / (int)(Math.random() |
System.out.println(result); | System.out.println(result); | ||
} catch (ArithmeticException e) { | } catch (ArithmeticException e) { |