I have a ArrayList like this:
[5, 181, 138, 95, 136, 179]
what i wanted to do, is convert this list to double []. Something like this.
double[] Fails = new double[]{5, 181, 138, 95, 136, 179};
This is my code:
ArrayList<String> DatesList = new ArrayList<String>();
ArrayList<String> FailList = new ArrayList<String>();
while (rs2.next()) {
DatesList.add(rs2.getString("Date"));
FailList.add(rs2.getString("fail"));
}
double[] Fails = new double[]{FailList}; //obviously it doesn't work..
Is there any way to convert from ArrayList to double[]?