This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Part of the answer states: The assert statement is being used to check a control-flow invariant to verify that the control flow never reaches a point in the program. This doesn't make sense to me since the assert statement is outside of the If statement unless I didn't match up the braces correctly. The assert statement would fire every time regardless of the flow thru the if's. If it had been written
then I could buy into this answer. I'm probably missing something, so I submit myself to those more knowledgable. I haven't found anything else where Dan's code and answers weren't 100% correct, so I'm sure I'm overlooking something, but what?