Here you can find the source of removeNullsAndEmptyString(final String[] strArray)
public static String[] removeNullsAndEmptyString(final String[] strArray)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static String[] removeNullsAndEmptyString(final String[] strArray) { List<String> list = new ArrayList<String>(Arrays.asList(strArray)); list.removeAll(Arrays.asList("", null)); return list.toArray(new String[list.size()]); }/*from w w w .j av a2 s . c om*/ }