java將多個連續的空格轉化成一個空格

java將多個連續的空格轉化成一個空格:  System.out.println("a       a".replaceAll(" + ", " "));                    結果:a a
相關文章
相關標籤/搜索