close
參考:
List<String> list = new ArrayList<String>(Arrays.asList("", "Hi", null, "How")); System.out.println(list); list.removeAll(Arrays.asList("", null)); System.out.println(list);
來源:arrays - In Java, remove empty elements from a list of Strings - Stack Overflow
文章標籤
全站熱搜
留言列表