Head First (Java)


		// for(int i=0
		// increment operator
		// while(i<10
		// for(String name:names

* For


		for (int i=0; i<10; i++) {

* Increment operator

	The placement of the operator (either before or after the variable) can affect the result.
	x++ is different from ++x


		int x = 0;
		int z = x++;
		System.out.println(x); // 1
		System.out.println(z); // 0

* While
	A while loop has only the boolean test; It doesn't have a built-in it initialization or Iteration expression.
	A while loop is good when you don't know how many times to loop and just want to keep going while 
	some condition is true.


		int i = 0;
		while(i<10) {

* For (each)

	Beginning with Java 5.0 (Tiger), the Java language has a second kind ofJor loop called the enhanced, 
	that makes it easier to iterate over all the elements in an array or other kinds of collections.


		String[] names = {"aaa", "bbb", "ccc"};
		for(String name:names) {