I'm writing a method which assigns a value to a variable with a given name, and should work something like this.
public void assignVariable(String varName, T val) {
T varName = val;
}
Is there any way to implement something like this?
I'm writing a method which assigns a value to a variable with a given name, and should work something like this.
public void assignVariable(String varName, T val) {
T varName = val;
}
Is there any way to implement something like this?