building file and variable names from variables
I'm fairly new to java, but need some help with converting what is an easy action in scripting languages but usually not so easy in programming languages. In scripting I would do the following (in pseudo-codish):
for i=0 , i<10 , i++
print "hello world no. $i"
var.$i = var.$i + var.$(i-1)
Note the use of the $i. How can I do this in Java? I can do it in C and Fortran, but can't seem to find a reference on how to do it in Java. (The specific commands I used above are an example only)
Thanks for your help.