package com.github.Avengers.larboratory;

import java.util.Iterator;

public class SimpleForEach implements Iterable<String>{

	private String[] str = {"tianlelu","why","write","this"};
	
	public Iterator<String> iterator() {		
		return new Iterator<String>(){
			private int index = 0;
			public boolean hasNext(){
				return index < str.length;
			}
			public String next() {
				return null;//不知道怎么写了
			}
			public void remove() {				
			}
		};
	}
	
	public static void main(String[] args) {
		SimpleForEach simpleForEach = new SimpleForEach();
		for(String s: simpleForEach){
			System.out.println(s);
		}
	}
}



@@ -121,16 +121,17 @@
 %3CString%3E
+ 
 %7B%0D%0A%0D%0A%09pr
@@ -167,22 +167,24 @@
 lu%22,
+ 
 %22why%22,
+ 
 %22write%22,
 %22thi
@@ -179,16 +179,17 @@
 %22write%22,
+ 
 %22this%22%7D;
@@ -190,17 +190,187 @@
 his%22%7D;%0D%0A
-%09
+%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09SimpleForEach simpleForEach = new SimpleForEach();%0D%0A%09%09for (String s : simpleForEach) %7B%0D%0A%09%09%09System.out.println(s);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A
 %0D%0A%09publi
@@ -400,18 +400,16 @@
 ator() %7B
-%09%09
 %0D%0A%09%09retu
@@ -433,19 +433,22 @@
 tring%3E()
+ 
 %7B%0D%0A
+%0D%0A
 %09%09%09priva
@@ -466,16 +466,18 @@
 x = 0;%0D%0A
+%0D%0A
 %09%09%09publi
@@ -495,16 +495,17 @@
 asNext()
+ 
 %7B%0D%0A%09%09%09%09r
@@ -529,32 +529,34 @@
 .length;%0D%0A%09%09%09%7D%0D%0A
+%0D%0A
 %09%09%09public String
@@ -581,12 +581,20 @@
 urn 
-null
+str%5Bindex++%5D
 ;//%E4%B8%8D
@@ -613,216 +613,14 @@
 %0D%0A%09%09
-%09public void remove() %7B%09%09%09%09%0D%0A%09%09%09%7D%0D%0A%09%09%7D;%0D%0A%09%7D%0D%0A%09%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09SimpleForEach simpleForEach = new SimpleForEach();%0D%0A%09%09for(String s: simpleForEach)%7B%0D%0A%09%09%09System.out.println(s);%0D%0A%09%09%7D
+%7D;%0D%0A%0D%0A
 %0D%0A%09%7D

fix forEach