How References Work
h1 = h0;
h0.setLength(9);
• Variables h0 and h1 refer to the same HLine instance
• The HLine referred to by h1 sees the change since it’s
the same HLine
HLine
HLine
int
h0:
length:
9
char
HLine
‘x’
h1: