`
lovnet
  • 浏览: 6726278 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
文章分类
社区版块
存档分类
最新评论

Java基础学习笔记之六(2)__常用类StringBuffer

 
阅读更多

StringBuffer介绍

A string buffer is like a String, but can be modified.
一个类似于 String 的字符串缓冲区,但可以修改
(可变的字符序列)


StringBuffer 常用方法:

1.public StringBuffer append(...);
Appends the string representation of the #?# argument
to the sequence.
将参数的字符串表示形式追加到此序列。

2.public StringBuffer insert(int offSet,E e)
在指定的位置上插入元素

3.public String delete(int start,int end);
Removes the characters in a substring of this sequence.
移除此序列的子字符串中的字符。

4.public StringBuffer reverse();
Causes this character sequence to be replaced by
the reverse of the sequence.
将此字符序列用其反转形式取代。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics