I have one class A which has an "int" field b; I defined another int type variable c. When I make any changes to A.b, I want c changes accordingly such that c=A.b .
One can always add a line c=A.b whenever A.b changes. But is there any better way to do that such as the method used in C/C++ : we can let c be a reference of A.b? (eg.: c=&(A.b) in c++)
thanks