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…
Question
Options
- ASercurityException
- BDuplicatePathException
- CIllegalArgumentException
- DTooManyArgumentsException
How the community answered
(50 responses)- A90% (45)
- B4% (2)
- D6% (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
Community Discussion
No community discussion yet for this question.