Since Java is a compiled language, all variable names must be resolved at compile-time. This may seem strange if you have experience with an interpreted language like Perl where you can build the variable name from the values of other variables. However, Java provides enough other tools that this usually isn't a deficiency. For instance, since you are using a counter in attempting to create the "dynamic variable name", this suggests that an array would be very suitable. Stan's first example above includes an array, but if you are unfamiliar with arrays, then
you should google for the syntax and other details. If you need a more sophisticated system to look up a value, rather than just by an integer index, then you should look at the Map class, as Stan suggested. However, I suspect this may be something to just remember for another day as it seems to me that an array will do just fine in this situation.
Keep Coding!
Layne