Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these operator is used to generate an instance of an exception than can be thrown by using throw?
  2. A.
    new
    B.
    malloc
    C.
    alloc
    D.
    thrown

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    new is used to create 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.


Be The First To Comment