Last active
August 29, 2015 14:18
-
-
Save javierhonduco/88d44eecb197bb10347a to your computer and use it in GitHub Desktop.
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; | |
class Untitled { | |
public static Double[] fake_data = {2.3, 5.2, 4.5}; | |
public static Integer fake_rows = 5; | |
public static ArrayList<ArrayList> linelist; | |
public static void run(){ | |
linelist = new ArrayList<ArrayList>(); | |
for(int i=0; i<fake_rows; i++){ | |
ArrayList<Double> row = new ArrayList<Double>(); | |
for(int j=0; j<fake_data.length; j++){ | |
row.add(fake_data[j]); | |
} | |
linelist.add(row); | |
} | |
System.out.println(linelist); | |
ArrayList<Double> row = linelist.get(0); | |
for(Double point: row){ | |
// Do things with the point | |
} | |
for(Double point: linelist.get(0)){ | |
// Do things with the point | |
} | |
} | |
public static void main(String[] args) { | |
run(); | |
} | |
} |
Author
javierhonduco
commented
Apr 3, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment