println("This program allows you to enter your exam results!");
int n0 = readInt("How many exam results do you have? ");
for (int n=1; n<=n0; n++) {
String r0 = "r"+n;
int result = readInt("Result "+n+": ");
println(r0);
}
I am new to java and I was wondering if it would be possible for me to set 'String r0' variable's contents as 'int result' variable's name (instead of result).
I wish to do so as my program will have multiple 'int result's and I will need to use each individual one later on for arithmetic purposes.