I want to be able to write a method with a string and integer as the parameters for example, and I want to then create a variable inside that class with the integer value in which I can later recall. For example:
public void setInt(String identifier, Integer) {
}
if I then call
setInt("age", 25); //stores 25 with identifier "age"
it would create a variable called age, which I could later access by calling
getInt("age") //would return 25
How would I go about doing this?