Which of the following is an unchecked exception?

Java Professional Easy

Java Professional — Easy

Which of the following is an unchecked exception?

Key points

  • Unchecked exceptions like IllegalArgumentException do not require explicit handling
  • Checked exceptions like IOException, SQLException, and ClassNotFoundException must be caught or declared
  • Unchecked exceptions are subclasses of RuntimeException
  • Checked exceptions are subclasses of Exception
  • IllegalArgumentException is commonly used for invalid method arguments

Ready to go further?

Related questions