Forum Discussion
avidCoder
6 years agoSuper Contributor
This code will take out the common b/w two lists:-
ArrayList<String> listOne = new ArrayList<>(Arrays.asList('0012345678', '0012123443', '0012321232', '65', '2324')); ArrayList<String> listTwo = new ArrayList<>(Arrays.asList('0012123443', '0012321232', '0055544321', '342', '3423')); listOne.retainAll(listTwo); log.info listOne
Related Content
- 2 years ago
Recent Discussions
- 16 hours ago