Im new to Java, Im just beginning with it because I was required to do it at work So long has been a fun ride, I have a question though, is it possible to assign values to variables dynamically ? For example if I have some labels
Label name1;
Label name2;
.
.
Label nameN;
Set their values with a for loop ?
I was hoping that I could do it as with Flash (im an actionscripter)
for ( var i=1; i <= N; i++)
{
this["name" + i].setText("Bla bla bla");
}
Thanks in advanced!
Label name1;
Label name2;
.
.
Label nameN;
Set their values with a for loop ?
I was hoping that I could do it as with Flash (im an actionscripter)
for ( var i=1; i <= N; i++)
{
this["name" + i].setText("Bla bla bla");
}
Thanks in advanced!