Nuacht

In the code above, stack is a Stack instance that enforces the preconditions, postconditions, and invariant defined by the assertion tags. Figure 3 shows a simplified version of what happens when ...
Keep your code extensible, pluggable and adaptable -- that's what SOLID's open-closed principle in Java means. Here's an example of how to properly apply it.
Understand the methodology impact of Java's new assertion facility Assertions are a fairly simple construct added to the soon-to-be released J2SE (Java 2 Platform, Standard Edition) 1.4.