Skip to content

Instantly share code, notes, and snippets.

@vaskoz
Created June 9, 2015 01:46
Show Gist options
  • Save vaskoz/eeab4138b4e757778390 to your computer and use it in GitHub Desktop.
Save vaskoz/eeab4138b4e757778390 to your computer and use it in GitHub Desktop.
decompiled foreach
import java.util.ArrayList;
import java.util.Iterator;
public class ForEach {
public ForEach() {
}
public static void main(String[] var0) {
ArrayList var1 = new ArrayList();
Iterator var2 = var1.iterator();
while(var2.hasNext()) {
String var3 = (String)var2.next();
System.out.println(var3);
}
}
}
import java.util.*;
public class ForEach {
public static void main(String[] args) {
List<String> data = new ArrayList<>();
for (String s : data) {
System.out.println(s);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment