class
StringBuf
{
public static void main(String args[])
{
StringBuffer sb = new
StringBuffer("Hello World");
System.out.println(sb +
".capacity() = " + sb.capacity());
System.out.println(sb +
".length() = " + sb.length());
System.out.println(sb +
".insert(5,aaa) = " + sb.insert(5,"aaa"));
System.out.println(sb +
".capacity() = " + sb.capacity());
System.out.println(sb +
".length() = " + sb.length());
System.out.println(sb +
".append(bbbb) = " + sb.append("bbbb"));
System.out.println(sb +
".reverse() = " + sb.reverse());
}
}
No comments:
Post a Comment