This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
I am writing regarding pag 91. The table 2.5 states that IF loop doesn't allow both break and continue statement even if in the pages before there many example where break and continue are used inside an IF loop. Can you please help me ?
Matt Road wrote:So I should correct the first line of this table : Break statement YES allowed (when LABEL is provided ) ... Am I right ?
The first line of table 2.5 should beIf you check this page of Oracle's Java tutorial about branching statements, it's not mentioned that a labeled break statement can be used together with an if statement. It's only discussing the different loops and the switch statement.
Thanks for noticing this! I've added it to our errata list and credited you. I have a different fix than Roel's though. I'd go with renaming the table header to be allows unlabeled break statements.
Esbjörn Rundberg wrote:Now I see, I wasn't paying enough attention when reading the thread.
So you already discovered an area which you must improve for the actual exam If you don't pay enough attention to the question, code snippet and possible answers; it's almost impossible to answer the question correctly (unless you are very lucky).