Skip to content

Instantly share code, notes, and snippets.

@codemickeycode
Last active August 29, 2015 14:17
Show Gist options
  • Save codemickeycode/f51cd9154d061d13bb6a to your computer and use it in GitHub Desktop.
Save codemickeycode/f51cd9154d061d13bb6a to your computer and use it in GitHub Desktop.
Java - List
import java.util.ArrayList;
public class ListComprehension {
public static void main (String[] args) {
ArrayList<Integer> list = new ArrayList<Integer>();
//for (i in Range.between(0, 10)){
for(int x = 0; x < 10; x++){
int num = x + 10;
list.add(num);
}
System.out.println(list.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment