Doubt related to reference variable

" Once a reference is initialized to an object, it cannot be changed to refer to another object. "

I just want to clarify that it means that
if y is an alias variable of x … then I can’t make y as a reference to z?

Can you explain me the given code then …
Code ) https://ide.codingblocks.com/s/245520

hello @N4i9kita

yeah right .u cannot make y as referecne of z.


No this is not the way through which u can create reference . this line is just assigining value of z to y (i,e 49) .
if u print print x, y , z then all three will print 49.

then increment value of y by 1.
and print x, y , z
it will print 50, 50 ,49 ( 50 ,50 because y is reference of x,49 because we havent changed value of z)

Thank you so much sir for clarifying my doubt.