I have a Class that needs to be return a Object built from a String and im not sure whats best to use for my situation.
my string comes in as JSONString and i am splittig it to get key value pairs that look like this.
variable = "x"
value = 60%
public class Math {
public String x = "";
public String y = "";
Solution 1: this is working but im not able to cast it into class.
String variable = keyVal[0];
String value = keyVal[1];
Map m = new HashMap();
m.put(variable, value);
Solution 2: I need to reference to Math.x via the variables
value but thats not working
String variable = keyVal[0];
String value = keyVal[1];
Math c = new Math();
c.variable = value;