For loop very useful. Like how you write them in C/C++.

The first one is initializing your counter variable. Second one then specify its termination boolean, And the last one is what it runs at the end.

For each loop

You can use the for loops like in python too. for (int i : intarray){ System.out.println(i); }