package com.lanxi.demo2; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class Test { public static void main(String[] args) { //引用一个Set集合实现类 Set set=new HashSet(); //添加单个元素 set.add("哈"); set.add("士");…
mybatis判断集合为空或者元素个数为零: <if test="mlhs != null and mlhs.size() != 0"> and t.mlh_name not in <foreach collection="mlhs" item="item1" open="(" close=")" index="i" separator=",">…
// 有一个集合,判断集合里有没有“world”这个元素,如果有,添加“javaee” List list = new ArrayList(); list.add("world"); list.add("java"); list.add("hello"); //ConcurrentModificationException /*Iterator it = list.iterator(); while(it.hasNext()){ String s…