[quote=引用 5 楼 qq_16951819 的回复:] [quote=引用 2 楼 shijing266 的回复:] 你没看到你的Size是1吗? 你的数组里面有值,只不过是个空对象
[quote=引用 2 楼 shijing266 的回复:] 你没看到你的Size是1吗? 你的数组里面有值,只不过是个空对象
public static boolean isEmpty(Collection collection) { return (collection == null) || (collection.isEmpty()); }
String a=""; for(int i=0;i<arr2.size();i++){ a+=arr2.get(i); } if(a.length()>0&&!a.isEmpty()&&a!=null){ System.out.println("ok"); }
你没看到你的Size是1吗? 你的数组里面有值,只不过是个空对象
debug一下arr2,如果是[, , , , ,]可不就是进if了
81,092
社区成员
341,717
社区内容
加载中
试试用AI创作助手写篇文章吧