QuestionQ37Verified/Secure Coding Practices for Error HandlingCopy linkReport a problemAsk AstroTutorSave questionIdentify which exception should NOT be caught when handling exceptions.AEOFExceptionBSecurityExceptionCIllegalAccessExceptionDNullPointerExceptionShow AnswerAnswerExplanationNullPointerException 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 moreNullPointerException (Java SE 26 API)EOFException (Java SE 26 API)Show comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion