Error/Java
java.lang.ArithmeticException: / by zero
dev?
2020. 4. 28. 10:46
반응형
java.lang.ArithmeticException: / by zero
[원인]
변수형을 int형으로 선언하여 발생
[해결]
int → long 형으로 변경
▶ing / long 형 비교
int |
long |
부호 있는 정수 |
부호 있는 정수 |
4byte ( 32bits ) |
8byte ( 64bits ) |
반응형