Variables in a class not changing?
I have this IndexSwitcher class:
i instantiate this class with the initial value of 0
when i use the switchIndex method, the currentValue variable prints out newIndex like it is supposed to, but when i use the GoToLastIndex, currentIndex always prints out the initial value that is 0, why doesnt it update when i use the SwitchIndex?
2 Replies