Assertions are a commonly used idiom for defensive programming. Suppose you are convinced that a particular property is fulfilled, and you rely on that property in your code. For example, you may be computing
double y = Math.sqrt(x);
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.