The program prints
35000
45000
45000
45000
The first two values are separate objects. Thus, raising the salary of one doesn't affect the other.
The second pair of values are pointers to a shared object.