How to concat two ArrayLists?

后端 未结 7 1299
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 23:29

I have two ArrayLists of equal size. List 1 consists of 10 names and list 2 consists of their phone numbers.

I want to concat the names and number into

7条回答
  •  情话喂你
    2020-12-14 00:12

    ArrayList resultList = new ArrayList();
    resultList.addAll(arrayList1);
    resultList.addAll(arrayList2);
    

提交回复
热议问题