Hi,
is there any posibility in java to build variable names out of strings at runtime?
I got and array of values and want to create variables out of them:
Can this be done in java?
despite crossposting is not welcome, i'm posting this question in the java-forum.
In the jsp-forum nobody seems to know an answer.
Anyway: For more background information you can find the thread at:
Hopefully somebody can give me some hints or an answer. Any help would be greatly appreceated. Thank you very much in advance,
Daniel
is there any posibility in java to build variable names out of strings at runtime?
I got and array of values and want to create variables out of them:
Code:
[b]The Array:[/b]
String my_array[] = new String[] {"one", "two"};
[b]And i need to build this two variables:[/b]
error_one="Value";
error_two="Value";
..where the parts "one" and "two" are taken out of the array.
despite crossposting is not welcome, i'm posting this question in the java-forum.
In the jsp-forum nobody seems to know an answer.
Anyway: For more background information you can find the thread at:
Hopefully somebody can give me some hints or an answer. Any help would be greatly appreceated. Thank you very much in advance,
Daniel