String[] aa = {"","","ddd","","asdf" };
List<String> tmp = new ArrayList<String>();
for(String str:aa){
if(str!=null && str.length()!=0){
tmp.add(str);
}
}
aa = tmp.toArray(new String[0]);
java中如何去掉字符串数组里面空格
最新推荐文章于 2024-07-28 02:27:35 发布