How can I return the difference between two lists?

后端 未结 10 688
终归单人心
终归单人心 2020-11-27 03:49

I have two array lists e.g.

List a;
contains : 10/10/2014, 10/11/2016

List b;
contains : 10/10/2016

How can i do

10条回答
  •  我在风中等你
    2020-11-27 04:37

    You can use CollectionUtils from Apache Commons Collections 4.0:

    new ArrayList<>(CollectionUtils.subtract(a, b))
    

提交回复
热议问题