Concatenate

In this short code example I am going to share with you how to concatenate two ArrayList in Java.  Concatenate ArrayList using addAll() function Let’s say we have these two ArrayList(s): List<String> itemsList1 = new ArrayList(Arrays.asList(“One”, “Two”)); List<String> itemsList2 = new ArrayList(Arrays.asList(“Three”, “Four”)); To concatenate the two lists together we can create a new ArrayList, and…

Read More Concatenate Two ArrayList in Java