How to Join Two Lists In Java

290 Flares Twitter 0 Facebook 0 Google+ 290 LinkedIn 0 Filament.io 290 Flares ×

Let us look at an example to understand how two lists can be joined together to create a merged list

If you just want to append the second list to the end of the first one, you can use

  • Kana

    listFinal.addAll(listOne);
    listFinal.addAll(listTwo);

    They should’ve been listMerged, shouldn’t they?

    Very nice tutorials and site, making great of these resources.

    Thanks. 🙂

    • You are correct It should be listMerged. Thanks for pointing out the typing error.