Converting List to String[] in Java

后端 未结 6 1628
暖寄归人
暖寄归人 2020-12-25 10:52

How do I convert a list of String into an array? The following code returns an error.

public static void main(String[] args) {
    List strlist         


        
6条回答
  •  悲&欢浪女
    2020-12-25 11:20

    I've designed and implemented Dollar for this kind of tasks:

    String[] strarray= $(strlist).toArray();
    

提交回复
热议问题