It will look something like this:
public static String fromCharCode(int... codePoints) {
StringBuilder builder = new StringBuilder(codePoints.length);
for (int codePoint : codePoints) {
builder.append(Character.toChars(codePoint));
}
return builder.toString();
}
Please note that execution is charnot guaranteed because the code value may exceed the upper limit char(65535). charwas installed in the dark days of Java when Unicode 3.1 has not yet been released, which goes beyond 65535 characters.
: String , int[] ( Java 1.5, ), . :
public static String fromCharCode(int... codePoints) {
return new String(codePoints, 0, codePoints.length);
}