Debugging Techniques : assert
a method to make sure that your invariants are true.
void assert(boolean condition, String errorMessage) { if (!condition) throw new Error(errorMessage);
}
Previous slide
Next slide
Back to first slide
View graphic version