String str = new String(" a b c d ");String str.trim().split(" ");trim():返回此字符串移除了前导和尾部空白的副本;如果没有前导和尾部空白,则返回此字符串。split(String regx):根据给定的正则表达式来拆分字符,返回字符串数组。