1
filterItems = null;
filterItems = new ArrayList<SelectItem>();
Iterator<String> it = RefListMap.keySet().iterator();
while (it.hasNext()) {
String s = (String) it.next();
filterItems.add(new SelectItem(s, s));
}
現在我得到filterItems size = 1但該值爲null。如何檢查數組元素不等於null。如何檢查java中的元素不爲空
if(filterItems != null)
{
code
}
但這種情況不起作用...請幫助我。