Here you can find the source of removeEmtpyStrings(String[] strings)
public static String[] removeEmtpyStrings(String[] strings)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; public class Main { /**// w w w.j av a 2s.com * Remove all empty/null Strings from the array. */ public static String[] removeEmtpyStrings(String[] strings) { ArrayList<String> res = new ArrayList<String>(); for (String string : strings) if (!(string == null || string.equals(""))) res.add(string); return res.toArray(new String[res.size()]); } }