StringBuilder appendCodePoint() method in Java with Examples Last Updated : 13 Dec, 2021 Comments Improve Suggest changes Like Article Like Report The appendCodePoint(int codePoint) method of StringBuilder class is the inbuilt method used to append the string representation of the codePoint argument to this sequence. The argument is appended to this StringBuilder content and length of the object is increased by Character.charCount(codePoint). The effect is the same as if the int value in parameter is converted to a char array and the character in that array were then appended to this character sequence. Syntax: public StringBuilder appendCodePoint(int codePoint) Parameters: This method accepts only one parameter codePoint which is int type value refers to a Unicode code point. Return Value: This method returns reference to this object.Below programs illustrate the java.lang.StringBuilder.appendCodePoint() method:Example 1: Java // Java program to illustrate the // appendCodePoint(int codePoint) import java.lang.*; public class Geeks { public static void main(String[] args) { // create StringBuilder object StringBuilder str = new StringBuilder("GeeksforGeeks"); System.out.println("StringBuilder = " + str); // Append 'C'(67) to the String str.appendCodePoint(67); // Print the modified String System.out.println("Modified StringBuilder = " + str); } } Output: StringBuilder = GeeksforGeeks Modified StringBuilder = GeeksforGeeksC Example 2: Java // Java program to illustrate the // appendCodePoint(int codePoint) import java.lang.*; public class Geeks { public static void main(String[] args) { // create StringBuilder object StringBuilder str = new StringBuilder("GeeksforGeeks"); System.out.println("StringBuilder = " + str); // Append ', '(44) to the String str.appendCodePoint(44); // Print the modified String System.out.println("Modified StringBuilder = " + str); } } Output: StringBuilder = GeeksforGeeks Modified StringBuilder = GeeksforGeeks, References: https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html#appendCodePoint(int) Comment More infoAdvertise with us Next Article StringBuilder appendCodePoint() method in Java with Examples A AmanSingh2210 Follow Improve Article Tags : Java java-basics Java-Functions Java-StringBuilder Practice Tags : Java Similar Reads StringBuffer appendCodePoint() Method in Java with Examples appendCodePoint() method of StringBuffer class appends the string representation of the codePoint argument to this sequence for which we require pre-requisite knowledge of ASCII table as then only we will be able to perceive output why the specific literal is being appended as there is already an in 3 min read StringBuffer codePointAt() method in Java with Examples The codePointAt() method of StringBuffer class returns a character Unicode point at that index in sequence contained by StringBuffer. This method returns the âUnicodenumberâ of the character at that index. Value of index must be lie between 0 to length-1. If the char value present at the given index 2 min read StringBuffer append() Method in Java with Examples Pre-requisite: StringBuffer class in Java The java.lang.StringBuffer.append() method is used to append the string representation of some argument to the sequence. There are 13 ways/forms in which the append() method can be used: StringBuffer append(boolean a) :The java.lang.StringBuffer.append(boole 13 min read StringBuilder codePointAt() in Java with Examples The codePointAt(int index) method of StringBuilder class takes an index as a parameter and returns a character unicode point at that index in String contained by StringBuilder or we can say charPointAt() method returns the "unicode number" of the character at that index. The index refers to char val 4 min read StringBuffer codePointCount() method in Java with Examples The codePointCount() method of StringBuffer class is used to return the number of Unicode code points in the specified range of beginIndex to endIndex of String contained by StringBuffer. This method takes beginIndex and endIndex as a parameter where beginIndex is the index of the first character of 3 min read StringBuffer codePointBefore() method in Java with Examples The codePointBefore() method of StringBuffer class is a method used to take an index as a parameter and returns the âUnicode numberâ of the character present before that index. The value of index must lie between 0 to length-1. If the char value at (index â 1) is in the low-surrogate range, char at 2 min read Matcher appendTail(StringBuilder) method in Java with Examples The appendTail(StringBuilder) method of Matcher Class behaves as a append-and-replace method. This method reads the input string and appends it to the given StringBuilder at the tail position. Syntax: public StringBuilder appendTail(StringBuilder builder) Parameters: This method takes a parameter bu 2 min read Java String codePoint() Method with Examples A Java string consists of a group of characters and each character is associated with a Unicode point value (alias ASCII value). So to get the Unicode point value of a character in a string we will use the codepoint() method. So in order to move further, we need to know what are the associated Unico 4 min read StringBuilder codePointCount() in Java with Examples The codePointCount() method of StringBuilder class returns the number of Unicode code points in the specified text range in String contained by StringBuilder. This method takes two indexes as a parameter- first beginIndex which represents index of the first character of the text range and endIndex w 3 min read StringBuilder codePointBefore() in Java with Examples The codePointBefore() method of StringBuilder class takes an index as a parameter and returns the "Unicode number" of the character before the specified index in String contained by StringBuilder. The index refers to char values (Unicode code units) and the value of index must lie between 0 to lengt 2 min read Like