Glad you got it.
Type: Posts; User: Norm
Glad you got it.
Did you add the println statements to EVERY where that gindex gets a value?
That includes in the constructor of the class where the object with the gindex variable is created?
In post #8 I asked...
Do you know why the value is not different?
If you understand that, you will be able to see a way to change it so each is different.
If you change the value of a variable via one path and it changes the value of the variable that is on another path, what does that imply? There is only ONE variable. All the different paths point...
Does your code set them to have the same values?
I'll suggest it again, add printlns to your code to display the values of the variables every time they are set. The printout should show you...
I don't see any printouts in your post that shows where the value was set to 8.
In fact there don't appear to be any printouts for any time the value of the variable was changed.
I suggested: ...
Add some printlns to show the values of those variables as they are being set and as they are referenced.
What is the problem with the values being the same? Many variables can have the same value...