This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See just like public void aMethod(int argument) throws AssertionError {......}
Please help
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benson, it's because assertionError is a subclass of Error. Remember that unchecked exceptions are exceptions that are subclass of RuntimeException and Error. You can declare it if you want, but the compiler only complains when dealing with checked exceptions.

[ August 13, 2003: Message edited by: Andres Gonzalez ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!