Doing things while for loop is running

Programmer 4 life :

I don't know how to do this, what i am trying to do is running a for loop and still can do other things like reading input from user,change files contents, etc...(you get the idea) while the loop is running, is there any way to do it? Btw i am using java