This post shows that the code below creates a List
from an array.
double[] features = new double[19];
List<Double> list = new ArrayList(Arrays.asList(features));
I'm expecting list
to contain 19 elements, each of which is 0.0. However, after running the code above, list
only contains 1 element, which is [0.0, 0.0, ..., 0.0]
. I'm running Java 6 and not sure if this is related.