Mushfiq Mammadov wrote:1. On page 188, the latest row
The actual code in the book is correct, but
newNumber(5); isn't an example of pass-by-value. Should indeed be
to have a true illustrative pass-by-value example
Mushfiq Mammadov wrote:2. On page 191, line #5 of example
I agree with you on this one: the comment behind the statement could indeed be confusing, certainly for the method invocations because you have the value of the parameter and you have the return value (which might be ignored). But there is just one number. If you have a look at the code (and/or read the explanation in the section), it's obviously the value of the variable used in the statement. Once you know this, these comments are not confusing anymore, but at a 1st glance it probably could be. And because the code is well explained in the section directly below the code, these line comments could even be dropped. Or for more clarity could be a little bit extended to
or even more verbose
Both indicate the value of the variable before and after this statement. Just a suggestion, don't know if it really improves the understanding of the comments in the code snippet
Mushfiq Mammadov wrote:3. On page 191, the last paragraph of section, fifth sentence:
Not maybe, but definitely
Mushfiq Mammadov wrote:Sorry for my English, maybe I don’t say my opinion correctly.
I think I understood everything correctly after a 1st read, so no problem here
Hope it helps!
Kind regards,
Roel