一、查找出有重复的数据时用set集合
用法如下
Set set = new HashSet();
for (String fieldName : attributeList) {
boolean a = set.add(fieldName);
if (!a) {
System.out.println("表名:" + entity.getCode() + "————字段名:" + fieldName + "——有重复");
}
二、今天读数据结构有新的感受,好像在和作者交流,能感觉到作者的编程思想,觉得作者考虑的很周全,哪里会报错也会考虑进去。应该学习