Here you can find the source of getInputs(String str)
public static final String[] getInputs(String str)
//package com.java2s; /*/*from w w w .j a v a 2s . co m*/ * Copyright 1999-2004 Alibaba.com All right reserved. This software is the confidential and proprietary information of * Alibaba.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only * in accordance with the terms of the license agreement you entered into with Alibaba.com. */ import java.util.ArrayList; import java.util.List; public class Main { public static final String[] getInputs(String str) { if (str == null) { return null; } String[] splits = str.split(","); List<String> list = new ArrayList<String>(); for (String split : splits) { if (!split.trim().equals("")) { list.add(split); } } return list.toArray(new String[] {}); } }