When I run the following code, it compiles but I get the AssertionError, as expected. However, "String" does not output, as the K&B book woud suggest. So, do I have it correct when I think that, in this example, if the assert expression results in true, then "String" and "well well" are both output, but if the expression results in false, then neither print out and I automatically get an Assertion Error?
Joined: Feb 07, 2005
The way you have it set up, you end the assert statement with the semicolon, and the SOP line is just another line.
You need to have a : after the assert condition, but you can't have a void method after the :.
You can do this.
Joined: Jul 10, 2006
Thankyou, thankyou. I did not even notice my syntax error. Everything is running as it should now.