What does the expression float a = 35 / 0 return?
0
Not a Number
Infinity
Run time exception
Answers
Answer:
9
Explanation:
1&9 are multiple so ans is 9
Concept Introduction:-
It could take the shape of a word or a numerical representation of a quantity's arithmetic value.
Explanation:-
We have been provided a question
We need to choose from the given alternatives the correct option
The correct option is Infinity
It is because In Java, whenever we divide any number (double, float, and long except integer) by zero, it results in infinity. According to the IEEE Standard for Floating-Point Arithmetic (IEEE ), if we divide will give positive infinity, will give negative infinity, and will give NaN. But on dividing an integer by zero, it throws a runtime exception, i.e., java.lang.ArithmeticException.
Final Answer:-
The correct answer is option Infinity.
#SPJ3