Question discussion

In Java, which exception is thrown when divide by zero executes ?

2902Easy DSSSB TGT Computer Science 0 replies 2 views
0

In Java, which exception is thrown when divide by zero executes ?

  • AArray Index Out of Bound
  • BArithmetic Exception
  • CIllegal State Exception
  • DNull Pointer Exception
Correct answer: B

Explanation

Integer division by zero throws ArithmeticException.

Discussion 0

Nobody has replied yet. Start the discussion!