nerdexam
Salesforce

CRT-450 · Question #228

A developer creates a custom exception as shown below: public class ParityException extends Exception {} What are two ways the developer can fire the exception in Apex? Choose 2 answers

Sign in or unlock CRT-450 to reveal the answer and full explanation for question #228. The question stem and answer options stay visible for context.

Question

A developer creates a custom exception as shown below:

public class ParityException extends Exception {} What are two ways the developer can fire the exception in Apex? Choose 2 answers

Options

  • Anew ParityException();:
  • Bthrow new ParityException("parity does not match");
  • Cnew ParityException('parity does not match');
  • Dthrow new ParityException();

Unlock CRT-450 to see the answer

You've previewed enough free CRT-450 questions. Unlock CRT-450 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full CRT-450 Practice