我有两个数组列表,例如
List<Date> a;
contains : 10/10/2014, 10/11/2016
List<Date> b;
contains : 10/10/2016
How can i do a check between list a
and b
so the value that is missing in b
is returned?eg 10/10/2014
原文由 Rory Lester 发布,翻译遵循 CC BY-SA 4.0 许可协议
您可以将它们转换为
Set
集合,并对它们执行集差操作。像这样: