posted 14 years ago
the output is: before: "Nissan 1500 after: Lexus 1500"
according to the source, it is not "Nissan 1500 after: Nissan 1500", because when the object of Car is retrieved, the constructor of Vehicle is excuted and the make variable is reset to Lexus although it was stored as Nissan.
But where is the constrcutor in class Vehicle???
ok if the class is implicitly added the constructor by the compiler, how would the constructor bring effect on the value of make?