How to retrieve data from ArrayList consists of array objects

前端 未结 6 1448
清歌不尽
清歌不尽 2021-01-23 23:23

My arraylist contains String array objects. How Can I get all values? My code is below,

String cordinates1c,cordinates2l,cordinates2m;                   
String[         


        
6条回答
  •  北恋
    北恋 (楼主)
    2021-01-24 00:08

    Hoping that you are trying to print the string in array1

    ArrayList alist= (ArrayList) Arrays.asList(array1);
    

    Now print the data from alist.

    also have a look into alist.addAll(collection)

    But following snippet will add array1 and array2 object to your ArrayList, So retrieval you will get an array object

    alist.add(array1);
    
    alist.add(array2);
    

提交回复
热议问题