Last active
August 29, 2015 14:17
-
-
Save codemickeycode/f51cd9154d061d13bb6a to your computer and use it in GitHub Desktop.
Java - List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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