i want to create dynamic fields
hi everybody
i want to define variables in specific class but in run time where its names can be changed
ex:
double <any variable> = 10;
where <any variable> can be changed like x or y and soon
thanks for ur care
hi everybody
i want to define variables in specific class but in run time where its names can be changed
ex:
double <any variable> = 10;
where <any variable> can be changed like x or y and soon
thanks for ur care
You can't do that, and I can't think of a reason why you would need to. For one thing you would have no way of using the fields short of reflection. Try a java.util.Map.
Bear in mind that a variable is not the object to which it refers. I suspect this misconception is at the root of your confusion