Shiva
What they are suggesting is that you should only use assertions in public methods if you know that a situation should never occur. an example would be:
Now the above example seems like a lousy
test. It is. But say you have a method that you know will always return a positive number in your code. Something that YOU wrote. Another method you wrote uses this method, and you want to assert that it is indeed returning a positive number - perhaps because it would only return a negative number due to a program bug.
See the difference?
SCJP 1.4, SCWCD J2EE 1.4, SCJD J2SE 1.5, SCBCD J2EE 1.3, SCDJWS (In Progress)