StringBuilder
建立一個型別為 char
作為引數的新 StringBuilder
將導致使用引數 int capacity
呼叫建構函式,而不是使用引數 String string
呼叫:
StringBuilder v = new StringBuilder('I'); //'I' is a character, "I" is a String.
System.out.println(v.capacity()); --> output 73
System.out.println(v.toString()); --> output nothing