以下範例是取代空白字元. String str="abc 123 def"; System.out.println(str.replaceAll("\\s", ""));. 結果為:abc123def. ps因為反斜線在java裡是 ...
確定! 回上一頁