building file and variable names from variables
Hi,
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"
open "filename$i"
readin "filename$i"
var.$i = var.$i + var.$(i-1)
done
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.