Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
DSA
22.5k+ articles
Java
10.5k+ articles
Java-Functions
4.1k+ articles
Difference Between
3.6k+ articles
Strings
3.2k+ articles
Java-lang package
390+ articles
java-basics
310+ articles
Java-Strings
220+ articles
Java-String-Programs
130+ articles
Java-StringBuilder
35 articles
java-StringBuffer
37 posts
Popular Articles
Recent Articles
Python Program for Remove leading zeros from a Number given as a string
Last Updated: 18 April 2025
Given numeric string str, the task is to remove all the leading zeros from a given string. If the string contains only zeros, then print a s
...read more
Strings
Pattern Searching
Python
Python Programs
java-StringBuffer
regular-expression
DSA
Difference Between Length and Capacity in Java
Last Updated: 18 May 2023
Length and capacity are two different things in Java. Length basically increases when characters are appended to the string whereas the capa
...read more
Java
Java-Strings
Difference Between
Picked
java-StringBuffer
StringBuffer indexOf() method in Java with Examples
Last Updated: 18 April 2023
In StringBuffer class, there are two types of indexOf() method depending upon the parameters passed to it.indexOf(String str)The indexOf(Str
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
Similar Topics
DSA
22.5k+ articles
Java
10.5k+ articles
Java-Functions
4.1k+ articles
Difference Between
3.6k+ articles
Strings
3.2k+ articles
Java-lang package
390+ articles
java-basics
310+ articles
Java-Strings
220+ articles
Java-String-Programs
130+ articles
Java-StringBuilder
35+ articles
StringBuffer lastIndexOf() method in Java with Examples
Last Updated: 18 April 2023
In StringBuffer class, there are two types of lastIndexOf() method depending upon the parameters passed to it.lastIndexOf(String str)The las
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer substring() method in Java with Examples
Last Updated: 30 July 2019
In StringBuffer class, there are two types of substring method depending upon the parameters passed to it.substring(int start)The substring(
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer getChars() method in Java with Examples
Last Updated: 17 November 2022
The getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) method of StringBuffer class copies the characters starting at the index:sr
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer setCharAt() method in Java with Examples
Last Updated: 04 December 2018
The setCharAt() method of StringBuffer class sets the character at the position index to character which is the value passed as parameter to
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer codePointAt() method in Java with Examples
Last Updated: 04 December 2018
The codePointAt() method of StringBuffer class returns a character Unicode point at that index in sequence contained by StringBuffer. This m
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer ensureCapacity() method in Java with Examples
Last Updated: 28 December 2022
The ensureCapacity() method of StringBuffer class ensures the capacity to at least equal to the specified minimumCapacity.If the current cap
...read more
Java
java-basics
Java-Functions
java-StringBuffer
StringBuffer trimToSize() method in Java with Examples
Last Updated: 04 December 2018
The trimToSize() method of StringBuffer class is the inbuilt method used to trims the capacity used for the character sequence of StringBuff
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer codePointCount() method in Java with Examples
Last Updated: 30 July 2019
The codePointCount() method of StringBuffer class is used to return the number of Unicode code points in the specified range of beginIndex t
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer subSequence() in Java with Examples
Last Updated: 17 February 2022
The subSequence(int start, int end) method of StringBuffer class is the inbuilt method used to return a subsequence of characters lie betwee
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
StringBuffer setLength() in Java with Examples
Last Updated: 19 August 2019
The setLength(int newLength) method of StringBuffer class is the inbuilt method used to set the length of the character sequence equal to ne
...read more
Java
java-basics
Java-lang package
Java-Functions
java-StringBuffer
A Java Random and StringBuffer Puzzle
Last Updated: 20 October 2018
Predict the output of the program[sourcecode language="Java" highlight=""]import java.util.Random;public class GFG { private static Rando
...read more
Java
Java-Strings
java-puzzle
java-StringBuffer
Sorting collection of String and StringBuffer in Java
Last Updated: 09 November 2020
Sorting a collection of objects can be done in two ways: By implementing Comparable (Natural Order) e.g. Strings are sorted ASCIIbetically.
...read more
Strings
Tree
Java
Java-Strings
java-StringBuffer
Java-String-Programs
DSA
First
1
2
3
>>
Last
First
1
2
3
>>
Last
First
1
2
3
>>
Last
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 !