If you have more than one instance of a class and change the value of a variable in one instance, the value will NOT be changed in any other instances,
UNLESS the variable is static. Then all the...
Type: Posts; User: Norm
If you have more than one instance of a class and change the value of a variable in one instance, the value will NOT be changed in any other instances,
UNLESS the variable is static. Then all the...
If time is a class variable, when its value changes, the whole class should see the new value.
The getter method should be in the class that has the variable whose value is to be returned.
Add a getter method in the Menu class that returns the value. Call that method when you want the value.