Multiple choice technology programming languages

Is following line throws Exception.If yes ,which type? justify it . float f = 100.00/0.0

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, dividing a floating-point number by zero does not throw an exception. Instead, it produces positive or negative infinity (Float.POSITIVE_INFINITY in this case). Only integer division by zero throws ArithmeticException. Therefore the statement does NOT throw an exception, making 'False' the correct answer.