Java – Convert integer list to int array

See English answers > how to convert list < integer > to int [] in Java? 17

Solution

I believe you can find something in third-party libraries, but I don't believe there is content in the Java standard library

I suggest you just write a practical function to do it, unless you need many similar functions (in this case, it's worth finding relevant third-party libraries) Note that you need to address the practice of an empty reference in the list, which obviously cannot be accurately represented in the int array

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>