heres a simple loop
Code:
1 int amountOfLoops = 0;
2 while (amountOfLoops <= 100) {
3 amountOfLoops++; //adds one to amountOfLoops
4 System.out.println(amountOfLoops); //outputs amountOfLoops to screen
5 }
1 - Defines the variable amountOfLoops (which is just the name) as an integer equal to zero.
2 - Conditional statement saying that if amountOfLoops is less then or equal to 100 do what is within the brackets.
3 - "Increment" amountOfLoops, which just means add one to it.
4 - Prints the variable amountOfLoops to the screen (i.e. it would do 1 2 3 4 etc.).
5 - End Loop