Exceptions | Assertions |
---|---|
An exception tells the user of the program that something in the program went wrong. | An assertion documents a program. When it fails, it informs that the program has a bug. |
Exceptions are created to deal with problems that might occur in the program. | Assertions are written to state the concepts of a program. |
Exceptions are used to test input/output as well as whether parameters are legal or not. | Assertions are documentations that can be checked by running the program. |
Welcome to the Java Blog, written by me with the sole purpose of talking about Java & Web technologies. I'm aiming this blog at other Java developers with the deeper aspects of writing code and resolving technical issues. Hopefully I can blog about some really interesting topics as I come across them. Mr. Patricia Seybold said, "If you learn to program in Java, you’ll never be without a job!"
Friday, May 29, 2009
Differences between exceptions and assertions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment