![string reverse codepoints java string reverse codepoints java](https://i.ytimg.com/vi/W49Y1qW0v3w/maxresdefault.jpg)
It throws IndexOutOfBoundsException when i is negative or larger than the length, or if an offset is positive and the substring starting with index i has fewer than offset code points, or if an offset is negative and the substring before i has fewer than the magnitude of offset code points. Returns the index in the sequence which is offset from index i by Offset code points. int offsetB圜odePoints(int i, int offset): Returns the character sequence as a subsequence of characters in the StringBuilder. CharSequence subsequence(int start, int end): Returns the String object equivalent to the StringBuilder object, that is, it returns a String representing the StringBuilder object. It reduces the capacity of the StringBuilder and makes it equal to its length. It returns the integer value of all the characters of the StringBuilder as an Integer stream. It returns a portion of the StringBuilder starting from index startup to the index end-1, in the form of a String object. It returns a portion of the StringBuilder starting from i th index up to the end, in the form of a String object. It replaces the substring in the StringBuilder (starting from index startup to index end-1 ) with the String str. StringBuilder replace(int start, int end, String str): It deletes a character from the StringBuilder on an i th index. It deletes the substring from the StringBuilder starting from index startup to index end-1. StringBuilder delete(int start, int end): It returns the reversed StringBuilder object on which it was called. It is used to reverse the sequence of characters in a StringBuilder object. It inserts the string representation of an Object o into the StringBuilder at the i th index. It inserts a character into the StringBuilder at the i th index. It inserts a string into the StringBuilder at the i th index. for example, appendCodePoint(65) will append ‘A’ to the StringBuilder. It concatenates the ASCII equivalent of int num at the end of StringBuilder. It concatenates the string representation of Object o at the end of StringBuilder. It concatenates the string format of int num at the end of StringBuilder. It concatenates the string str at the end of StringBuilder. It sets the value of a character on the i th index in the StringBuilder. It returns the value of the character stored on the i th index in the StringBuilder. Int targetStart specifies the position in the array from which the characters of substring start storing. It copies a substring of the StringBuilder into a character array. void getChars(int start, int end, char target, int targetStart): And if the specify a length less than the current length, then characters beyond the new length get deleted. When we increase the size of the buffer, null characters are added to the end of the existing buffer. Here the length specifies the length of the buffer. It is used to set the minimum capacity of StringBuilder equals to the cap. Capacity will always be greater than or equal to the length of StringBuilder. It tells the current capacity of the StringBuilder.
![string reverse codepoints java string reverse codepoints java](https://i.ytimg.com/vi/fGd3-ik0TYo/maxresdefault.jpg)
It tells the current length of the StringBuilder (not the capacity ). #Methods of StringBuilder Class int length(): Two StringBuilder objects can never be equal, therefore for comparing them, first convert them to String objects and then use equals() method. The rule of this allocation is: if the new_length is less than or equal to 2*(capacity+1). When the length of StringBuilder exceeds its capacity, then memory allocation is done. StringBuilder(CharSequence s): Creates a StringBuilder with the content of CharSequence s.StringBuilder(String s): Creates a StringBuilder having the content of String s.StringBuilder(int cap): Creates an empty StringBuilder with initial capacity equals to cap.Having initial capacity as 16 means that the memory to store 16 characters is allocated to the StringBuilder.
![string reverse codepoints java string reverse codepoints java](http://3.bp.blogspot.com/-8cOKPfQS1b8/UV_iUCbjxrI/AAAAAAAAALk/R_5UFvvWCaQ/w1200-h630-p-k-no-nu/j111.png)
capacity: The initial memory allocated to the StringBuilder.StringBuilder(): Creates a StringBuilder with default capacity (that is 16) and no characters in it.