I was wondering if in Java there was any way to give a new variable a name which is the value of another variable. The below code is an non working example of what I'm trying to do.
int a = 0;
while(true){
String (a) = "newValue";
a = a + 1;
}
or
String b = "newVariableName";
int (b) = 1;
Thank for any help given.