division by zero java exception name code example
Example: divide by zero exception java
int a=123;
int b=0;
double c=123;
double d=0;
int result=a/b;//throws ArithmeticException
double result2=c/d;//returns Infinity
int a=123;
int b=0;
double c=123;
double d=0;
int result=a/b;//throws ArithmeticException
double result2=c/d;//returns Infinity