StringBuffer appendCodePoint() Method in Java with Examples Last Updated : 08 Jun, 2022 Comments Improve Suggest changes Like Article Like Report 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 integer value been assigned. --> appendCodePoint() Method --> StringBuffer Class --> java.lang Package Syntax: public StringBuffer appendCodePoint(int cp) Parameters: The method accepts a single parameter cp of integer type and refers to the Unicode code point. Return Type: The method returns this object after appending the string represented by the codepoint. Illustrations: Input : StringBuffer = Apple int cp = 65 Output: AppleA Input : StringBuffer = GeeksforGeeks int cp = 156 Output: GeeksforGeeks? Explanation: Because 65 is the ASCII value for 'A' and 156 is the ASCII value for '?' Example 1: Java // Java program to illustrate appendCodePoint() Method // of StringBuffer class // Importing required classes import java.lang.*; // Main class public class GFG { // Main drive method public static void main(String[] args) { // Reading passed string StringBuffer sbf = new StringBuffer("Geeksforgeeks"); // Printing the string System.out.println("String buffer = " + sbf); // Appending the CodePoint as String to the string // buffer sbf.appendCodePoint(65); // Printing the string again after // appending codePoint as string System.out.println("After appending CodePoint is = " + sbf); } } Output: String buffer = Geeksforgeeks After appending CodePoint is = GeeksforgeeksA Example 2: Java // Java Program to Illustrate appendCodePoint() Method // of StringBuffer class // Importing required classes import java.lang.*; // Main class public class GFG { // Main driver method public static void main(String[] args) { // Reading passed string by creating object of class StringBuffer sbf = new StringBuffer("Geeksforgeeks"); System.out.println("String buffer = " + sbf); // Here it appends the CodePoint as // string to the string buffer sbf.appendCodePoint(54); System.out.println("After appending CodePoint is = " + sbf); } } Output: String buffer = Geeksforgeeks After appending CodePoint is = Geeksforgeeks6 Example 3: Java // Java program to illustrate appendCodePoint() Method // of StringBuffer class // Importing required classes import java.lang.*; // Main class public class GFG { // Main driver method public static void main(String[] args) { // Reading passed string StringBuffer sbf = new StringBuffer("Geeksforgeeks"); // Printing string on console System.out.println("String buffer = " + sbf); // Appending the codePoint as string // to the string buffer sbf.appendCodePoint(43); // Printing the string on console after // appending codepoint as string System.out.println("After appending CodePoint is = " + sbf); } } Output: String buffer = Geeksforgeeks After appending CodePoint is = Geeksforgeeks+ Comment More infoAdvertise with us Next Article StringBuffer appendCodePoint() Method in Java with Examples ankita_chowrasia Follow Improve Article Tags : Java Java-Strings Java-lang package Java-Functions java-StringBuffer +1 More Practice Tags : JavaJava-Strings Similar Reads StringBuilder appendCodePoint() method in Java with Examples 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). 2 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 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 StringBuffer delete() Method in Java with Examples The java.lang.StringBuffer.delete() is an inbuilt method in Java which is used to remove or delete the characters in a substring of this sequence. The substring starts at a specified index start_point and extends to the character at the index end_point. Syntax : public StringBuffer delete(int start_ 3 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 Matcher appendTail(StringBuffer) method in Java with Examples The appendTail(StringBuffer) method of Matcher Class behaves as a append-and-replace method. This method reads the input string and appends it to the given StringBuffer at the tail position. Syntax: public StringBuffer appendTail(StringBuffer buffer) Parameters: This method takes a parameter buffer 2 min read StringWriter append(char) method in Java with Examples The append(char) method of StringWriter Class in Java is used to append the specified char value on the writer. This char value is taken as a parameter. Syntax: public void append(char charValue) Parameters: This method accepts a mandatory parameter charValue which is the char value to be appended o 2 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 Like