for (int i = 0; i < 5; i++) {
//your code goes here
}
This loop will repeat itself 5 times. I'm not sure how familiar you are with the i++ syntax, but it is the same as i = i + 1, so if you feel more comfortable writing that in the loop instead, it would also work. Just a word of caution, make sure, in general, you DO NOT redefine i (or whatever variable you choose to use as the counter) inside the loop. That is a very easy way to cause an endless loop.