Why does the variable value show a value of 2 as printWith5 is called? Shouldn't the object at that point reflect a value of 7?
@maryelainecaliff Жыл бұрын
Thank you for catching that. I'm rather disappointed in all of my students who haven't pointed that mistake out to me. You are correct that the value in main had changed to 7 (as we could see right before the call to the print function), and that's how we managed to pass 7 to the printWith5 function. This was purely a failure in copy/paste/changing.