ArrayList to Array of Strings in java

前端 未结 5 1680
一向
一向 2021-02-05 11:53
ArrayList newArray = new ArrayList();
newArray = urlList.getUrl();
for( int i = 0 ; i < newArray.size();i++)
{
    System.out.println(newA         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 12:15

    In plain java i'm use something like

    rolesList.toArray(new Integer[rolesList.size()]);
    

    for converting list to array. Don't know in android.

提交回复
热议问题