I have some buttons on named btnA1, btnA2, btnA3, btnB1, btnB2, btnB3, and so forth. I want to know how I can reference to them by combining variable values. For example:
String var1 = "A";
int var2 = 2;
btn[var1+var2].setText("foo"); // <- This line doesn't work. What do I use in place of this one?
Supposedly, the above code will reference to btnA2 but it doesn't work.