How to cast from List to double[] in Java?

前端 未结 7 507
野性不改
野性不改 2020-11-28 13:18

I have a variable like that:

List frameList =  new ArrayList();

/* Double elements has added to frameList */

H

相关标签:
7条回答
  • 2020-11-28 13:57

    You can convert to a Double[] by calling frameList.toArray(new Double[frameList.size()]), but you'll need to iterate the list/array to convert to double[]

    0 讨论(0)
提交回复
热议问题