posted 19 years ago
Hi Friends,
I have some doubt understanding these statement,can someone please throw in some simple example(code) for each of these cases:
case1:The assert statement is being used to check a postcondition--
something that must be true when the method completes successfully.
Case2:The assert statement is being used to check a class invariant--
something that must be true about each instance of the class.
Case3:The assert statements are being used to check a precondition--
something that must be true when the method is invoked.
Thanks in Advance!!!
SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)