I don't quite get what you are trying to accomplish. But since you are creating String variables with the name of 'var#', you will definately need a variable to keep track of the next number so that you wouldn't create an instance of the same variable name again.
But I can't see how you can create variable names dynamically..??
Anyway if you want another solution, you can add your created Strings to an ArrayList. Just call the .size() method from the ArrayList class and you will be able to get the number of variables you have created.
Hope this helps,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.