This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
in K&B's book on pg 225, 3rd chapter, fig 3.6.... the illegal reference assignments whcih are given below... the last one... that is... myCats= moreCats; the explaination given for this is "cant assign an array object to a nonarray refernce"... but in the code moreCats is a reference variable, not an array object... so should it be moreCats....
posted 8 years ago
myCats is a 2-D array object of Cat (i.e., Cat). moreCats is a 1-D array object of Cat (i.e., Cat).
In this case (myCats= moreCats ) ,they are trying to assign a Cat (Right hand side value i.e moreCats) to a Cat object (left hand side value i.e., myCats).