?? stringbufferuse.txt
字號:
/*Source*/
import java.lang.StringBuffer;
public class StringBufferUse {
public static void main(String[] args) {
StringBuffer buffer = new StringBuffer("SuperMan is a man.");
int index=buffer.indexOf(" a");
System.out.println("the StringBuffer before is "+buffer);
System.out.println("the insert index is "+index);
buffer.insert(index, " good");
System.out.println(buffer);
System.out.println("reverse:\n" + buffer.reverse());
}
}
/*Result
--------------------Configuration: <Default>--------------------
the StringBuffer before is SuperMan is a man.
the insert index is 11
SuperMan is good a man.
reverse:
.nam a doog si naMrepuS
Process completed.
*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -