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

[255 byte] By [elmoftya] at [2007-11-27 11:46:54]
# 1

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.

ejpa at 2007-7-29 18:10:09 > top of Java-index,Core,Core APIs...
# 2

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

georgemca at 2007-7-29 18:10:09 > top of Java-index,Core,Core APIs...