I have two ArrayList<Int>
And i want a way to merge both of the ArrayList<Int>
in 1 new ArrayList<Int>
I have two ArrayList<Int>
And i want a way to merge both of the ArrayList<Int>
in 1 new ArrayList<Int>
It’s as simple as:
val arrayList3 = arrayList1 + arrayList2
i solved it with
arraylist3.addAll(arraylist1)
arraylist3.addAll(arraylist2)
Thank you by the way
This returns a List , not an ArrayList. I was using this method but I got an List as the type of arrayList3 in your case.