I am trying to create a list of arrays. These arrays contain doubles. When I use .add() I get this error: no suitable method found for add(double[]) method.java.util.List.add(int,java.lang.Double[]) is not applicable
Here is a simplification of my code:
List<Double[]> allTris = new ArrayList<Double[]>();
List<String> tempList = new ArrayList<String>();
tempList.add("0.0");
tempList.add("1.0");
tempList.add("2.0");
double[] tri = new double[tempList.size()];
for(int i = 0; i < tempList.size(); i++) {
tri[i] = Double.parseDouble(tempList.get(i));
}
allTris.add(tri); //here is where my error is happening