PPT Slide
Assignment with References to Objects:
Given this:
str1 str2
doody
howdy
The statement str1 = str2; would give:
str1str2
doody
howdy
But str1 = str2.clone(); would give:
str1
str2
doody
doody
Objects and References
Two distinct areas of memory
Two references
to one
object
Previous slide
Next slide
Back to first slide
View graphic version