nerdexam
SalesforceSalesforce

PDI · Question #228

PDI Question #228: Real Exam Question with Answer & Explanation

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

Submitted by haruto_sh· Apr 18, 2026Logic and Process Automation

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 PDI to see the answer

You've previewed enough free PDI questions. Unlock PDI 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.

Topics

#Apex Exceptions#Custom Exceptions#Throw Keyword#Error Handling
Full PDI PracticeBrowse All PDI Questions