Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, November 19, 2007

java Debugging error checking - assert

Use assert statements liberally to debug your own code. See Assertions. Assertions are very easy to use and are very helpful during testing. You can leave them in your final code.

Off at runtime. The disadvantage of assertions is that they are turned off by default during execution. Try to run with them turned on if possible. Some programmers think it's an advantage that they're off at runtime -- there is no execution overhead, and the user won't be faced with potentially puzzling messages.

No comments:

Post a Comment

Archives