nerdexam
Oracle

1Z0-808 · Question #77

Which two are Java Exception classes?

The correct answer is A. SercurityException C. IllegalArgumentException. Options A and C refer to real Java exception classes found in java.lang: SecurityException (note: option A contains a typo - "Sercurity" is misspelled as "Sercurity" → "SercurityException") and IllegalArgumentException. SecurityException is thrown by the security manager when a…

Handling Exceptions

Question

Which two are Java Exception classes?

Options

  • ASercurityException
  • BDuplicatePathException
  • CIllegalArgumentException
  • DTooManyArgumentsException

How the community answered

(50 responses)
  • A
    90% (45)
  • B
    4% (2)
  • D
    6% (3)

Explanation

Options A and C refer to real Java exception classes found in java.lang: SecurityException (note: option A contains a typo - "Sercurity" is misspelled as "Sercurity" → "SercurityException") and IllegalArgumentException. SecurityException is thrown by the security manager when a security violation occurs, while IllegalArgumentException is thrown when a method receives an illegal or inappropriate argument.

Options B (DuplicatePathException) and D (TooManyArgumentsException) do not exist in the standard Java API - they are fabricated names designed to sound plausible but have no corresponding class in java.lang or any standard Java package.

Memory tip: Real Java exception names tend to describe a JVM-level or language-level condition (security, illegal state, null pointer, array index). If an exception name sounds like a high-level application concern (e.g., "TooManyArguments", "DuplicatePath"), it's likely invented. When in doubt, recall the java.lang staples: IllegalArgumentException, IllegalStateException, NullPointerException, SecurityException, UnsupportedOperationException.

Note for exam prep: Flag option A - "SercurityException" is misspelled in the question. The actual class is SecurityException. If this appears on a real exam, that typo may be intentional as a distractor itself.

Topics

#exception classes#Java API exceptions#standard library#class identification

Community Discussion

No community discussion yet for this question.

Full 1Z0-808 Practice