QuestionQ37

VerifiedSecure Coding Practices for Error Handling

Identify which exception should NOT be caught when handling exceptions.

Explanation

NullPointerException is a runtime exception thrown when code uses null where an object is required. It normally indicates a defect that should be corrected through null checks, validation, or program logic, rather than suppressed with a catch block. Oracle documents it as occurring when an application attempts to use null where an object is required.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!