+ 12
Which error occurs?
int a=5/0; is this a logical or runtime error (in JDK8)?
7 Réponses
+ 8
From Wikipedia:
The infinities of the extended real number line can be represented in IEEE floating point datatypes, just like ordinary floating point values like 1, 1.5 etc. They are not error values in any way, though they are often (but not always, as it depends on the rounding) used as replacement values when there is an overflow. Upon a divide by zero exception, a positive or negative infinity is returned as an exact result.
+ 5
i think its logical error https://en.wikipedia.org/wiki/Division_by_zero
+ 4
it will show an Arithmetic exception error
+ 3
This is due to the fact that division by zero is a syntax error..
+ 2
it throws ArithmeticException
+ 1
I think this is logical error and in program we can handle this type of errors through exception handling concept in java
- 1
/ not allowed assigning integers