You should not have the same value in two classes. You should have the value in one class and one only. It should have one copy and one only. If you need the other class to use it, it can be provided by a public getXXX method. If you really need to signal the other object about a change, you are getting into more advanced practices: look for the observer
pattern.