5 years ago in Java Exception Handling

When a method can throw an exception then it is specified by _____ keyword

[A] finally
[B] throw
[C] throws
[D] catch
Loading...
Next Question

Overall Stats

Attempted 560
Correct 218
Incorrect 157
Viewed 185

Answers

Guest
Guest
Vaibhav Bisht
Vaibhav Bisht - 3 weeks ago

Vaibhav Bisht from Dehradun, India is saying finally is correct answer

Awa Kone
Awa Kone - 3 weeks ago

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

ayoub benigmim
ayoub benigmim - 1 month ago

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

Souad El
Souad El - 1 month ago

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

Salwa Nouamani
Salwa Nouamani - 1 month ago

Salwa Nouamani from Casablanca, Morocco is saying catch is correct answer

Related Questions

Which of the following must be true of the object thrown by a throw statement?

  • [A] It must be assignable to the Throwable type
  • [B] It must be assignable to the Error type
  • [C] It must be assignable to the Exception type
  • [D] It must be assignable to the String type

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

parseInt() and parseLong() method throws ________________ ?

  • [A] ArithmeticException
  • [B] ClassNotFoundException
  • [C] NullPointerException
  • [D] NumberFormatException