Home » JAVA Programming » Exceptions » Question
  1. Which of these operator is used to generate an instance of an exception than can be thrown by using throw?
    1. alloc
    2. thrown
    3. new
    4. malloc
    5. None of these
Correct Option: C

new is used to create an instance of an exception. All of java’s built in run-time exceptions have two constructors: one with no parameters and one that takes a string parameter.



Your comments will be displayed only after manual approval.