描述
我们知道使用List的retainAll方法可以获取两个集合的交集,但是在某些情况下方法的返回值并非我们想象那样。
现象
先看两个例子: public static void main(String[] args) {List<String> a new ArrayList<>();a.add("READ&quo…
Java中取多个集合的交集
集合 Collection 接口中定义了 retainAll()方法
retainAll() Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are …
1.1 网络配置
对安装好的 VMware 进行网络配置,方便虚拟机连接网络,本次设置建议选择 NAT 模 式,需要宿主机的 Windows 和虚拟机的 Linux 能够进行网络连接,同时虚拟机的 Linux 可 以通过宿主机的 Windows 进入互联网。
1.1.1 编…
文章目录 hadoop目录配置hadoop角色hadoop运行和使用hadoop 观察FsImage和EditLog分发配置 hadoop目录
bin :功能模块sbin:shell脚本etc:配置lib:使用库 bin和sbin目录都要加入到环境变量中。
vi /etc/profile增加: …