小编Gar*_*any的帖子

Collections.emptySet() 与 new HashSet<>()

如何验证 Set 是空集还是 new HashSet<>() ?尝试了两种方法 -

  1. size
  2. CollectionUtils.isEmpty() 两者产生相同的值。

java collections hashset is-empty

1
推荐指数
1
解决办法
4025
查看次数

标签 统计

collections ×1

hashset ×1

is-empty ×1

java ×1