5 years ago in Java Exception Handling

If a statement tries to divide by zero which exception is thrown?

[A] ArithemticException
[B] NullPointerException
[C] NumberFormatException
[D] None of these
Loading...
Next Question

Overall Stats

Attempted 557
Correct 314
Incorrect 54
Viewed 189

Answers

Guest
Guest
Shamsa hafeez
Shamsa hafeez - 2 days ago

Shamsa hafeez from Lahore, Pakistan is saying NullPointerException is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying None of these is correct answer

Awa Kone
Awa Kone - 1 month ago

Awa Kone from Berrechid, Morocco is saying ArithemticException is correct answer

ayoub benigmim
ayoub benigmim - 1 month ago

ayoub benigmim from Casablanca, Morocco is saying ArithemticException is correct answer

Souad El
Souad El - 1 month ago

Souad El from Casablanca, Morocco is saying ArithemticException is correct answer

Related Questions

To create our own exception class , we have to _______

  • [A] Extend exception class
  • [B] Create our own try and catch block
  • [C] use finally block
  • [D] Use throws keyword

When an array element is accessed beyond the array size , ____ exception is thrown

  • [A] ArrayElementOutOfLimit
  • [B] ArrayIndexOutOfBounds Exception
  • [C] ArrayIndexOutOfBounds
  • [D] ArrayElementOutOfBounds

if super class method does not declare exception then

  • [A] sub class can not declare checked exception but declare unchecked exception
  • [B] subclass declare checked exception