for (int i = 0; i < 3; i++) {     // your code goes here }

Read more of this post