Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Java
10.8K+ articles
Java-Functions
4.2K+ articles
Strings
3.3K+ articles
Java-lang package
417+ articles
java-basics
330+ articles
Java-Strings
240+ articles
Java-String-Programs
148+ articles
java-StringBuffer
37+ articles
Java-StringBuilder
35 posts
Recent Articles
Popular Articles
StringBuilder indexOf() method in Java with Examples
Last Updated: 18 April 2023
In StringBuilder class, there are two types of indexOf() method depending upon the parameters passed to it.indexOf(String str)The indexOf(String str) method of StringBuild...
read more
Java
java-basics
Java-Functions
Java-StringBuilder
StringBuilder toString() method in Java with Examples
Last Updated: 23 January 2023
The toString() method of the StringBuilder class is the inbuilt method used to return a string representing the data contained by StringBuilder Object. A new String object...
read more
Java
java-basics
Java-Functions
Java-StringBuilder
StringBuilder trimToSize() method in Java with Examples
Last Updated: 30 July 2019
The trimToSize() method of StringBuilder class is the inbuilt method used to trims the capacity used for the character sequence of StringBuilder object. If the buffer used...
read more
Java
java-basics
Java-Functions
Java-StringBuilder
StringBuilder appendCodePoint() method in Java with Examples
Last Updated: 13 December 2021
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....
read more
Java
java-basics
Java-Functions
Java-StringBuilder
Replace a character at a specific index in a String in Java
Last Updated: 08 January 2024
In Java, here we are given a string, the task is to replace a character at a specific index in this string.Examples of Replacing Characters in a StringInput: String = "Gee...
read more
Strings
Java
DSA
Java-Strings
Java-lang package
Java-StringBuilder
Java-String-Programs
Java StringBuilder Class
Last Updated: 08 April 2025
In Java, the StringBuilder class is a part of the java.lang package that provides a mutable sequence of characters. Unlike String (which is immutable), StringBuilder allow...
read more
Java
Java-lang package
Java-Class and Object
Java-StringBuilder
Java Strings
Last Updated: 06 May 2025
In Java, a String is the type of object that can store a sequence of characters enclosed by double quotes, and every character is stored in 16 bits, i.e., using UTF 16-bit...
read more
Strings
Java
Java-Strings
Java-StringBuilder
java-StringBuffer
StringBuffer vs StringBuilder in Java
Last Updated: 15 October 2024
Java provides three classes to represent the sequence of characters i.e. String, StringBuffer, and StringBuilder. A string is immutable in Java whereas, both StringBuffer ...
read more
Java
Difference Between
Java-StringBuilder
java-StringBuffer
Remove first and last character of a string in Java
Last Updated: 24 February 2025
Given a string str, the task is to write the Java Program to remove the first and the last character of the string and print the modified string.Examples:Input: str = "Gee...
read more
Strings
Java Programs
DSA
Java-StringBuilder
java-StringBuffer
Java-String-Programs
strings
Swap the first and last character of a string in Java
Last Updated: 02 November 2023
Given string str, the task is to write a Java program to swap the first and the last character of the given string and print the modified string.Examples:Input: str = "Gee...
read more
Strings
Java
DSA
Java-Strings
Java-StringBuilder
Java-String-Programs
strings
Check if a palindromic string can be obtained by concatenating substrings split from same indices of two given strings
Last Updated: 05 April 2023
Given two strings A and B of length N, the task is to check if any of the two strings formed by splitting both the strings at any index i (0 ≤ i ≤ N - 1) and concatenating...
read more
Strings
Interview Experiences
Algorithms
Searching
Experienced
CS – Placements
DSA
Arrays
palindrome
substring
Java-StringBuilder
Experiences
When to use Rope over StringBuilder in Java?
Last Updated: 05 July 2022
What are Ropes?Rope is a binary tree data structure where each node except the leaf contains the number of characters present to the left of the node.They are mainly used ...
read more
Strings
Java
Picked
DSA
Java-StringBuilder
Check if it is possible to make all elements into 1 except obstacles
Last Updated: 30 March 2023
Given a matrix M[][] of size N * M containing characters 0 and X. You have to choose a sub-matrix of 2*2 size, which doesn't contains X in it, and convert all the 0 under ...
read more
Matrix
Competitive Programming
DSA
Java-StringBuilder
Find the string of length N according to the given conditions
Last Updated: 29 January 2024
Given two integers N and K. Then your task is to output the string of length N such that the cumulative sum of the string is equal to K:Where the Cumulative sum of the str...
read more
Greedy
Android
Geeks Premier League
DSA
Greedy Algorithms
Java-StringBuilder
DSA-Blogs
Geeks Premier League 2023
Java StringBuilder delete(int start, int end) Method
Last Updated: 10 January 2025
delete(int start, int end) method in the StringBuilder class is used to remove a portion of the string, starting from the specified start index to the specified end index....
read more
Java
Java-StringBuilder
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !