《劍指offer》關於「替換空格」的整理(java版)

將空格替換成「abc」 方法一: 使用java的API,String.replace()方法的簡單實現。 public class Main { public static void main(String[] args) { String s = "1 2 3 4 5 6 7 8 9 0"; s = method(s); System.out.println(s); } private st
相關文章
相關標籤/搜索