java.lang.StringBuffer.appendCodePoint(int codePoint)%uA0方法追加码点参数顺序的字符串表示形式。该参数被附加到这个序列中的内容。
声明
以下是java.lang.StringBuffer.appendCodePoint()方法的声明
public StringBuffer appendCodePoint(int codePoint)
参数
-
codePoint%uA0-- 这是一个Unicode代码点。
返回值
该方法返回一个此对象引用。
异常
-
NA
例子
下面的例子显示java.lang.StringBuffer.appendCodePoint()方法的使用。
package com.yiibai import java.lang.* public class StringBufferDemo { public static void main(String[] args) { StringBuffer buff = new StringBuffer("tutorials") System.out.println("buffer = " + buff) // appends the CodePoint as string to the string buffer buff.appendCodePoint(80) // print the string buffer after appendingCodePoint 80 System.out.println("After appendCodePoint = " + buff) } }
让我们来编译和运行上面的程序,这将产生以下结果:
buffer = tutorials After appendCodePoint = tutorialsP