Java – How to remove first and last character from a String ?
In this article, we will learn how to remove 1st and last character from a String using String‘s methods and StringBuffer/StringBuilder method in different ways Read More
In this article, we will learn how to remove 1st and last character from a String using String‘s methods and StringBuffer/StringBuilder method in different ways Read More
In this article, we will learn how to find/get 1st and last character in a String using String‘s methods & StringBuffer/StringBuilder method in different ways Read More
In this article, we will discuss how to sort collection of, String StringBuffer StringBuilder In Collection framework hierarchy, below classes sorts value/objects stored by-default in Read More
In this article, we will discuss how to convert first character of every word to uppercase For conversion, we will use either StringTokenizer class split() Read More
In this article, we will discuss difference between capacity() and length() methods of StringBuffer in detail with example Often times, this two methods get confused Read More
In this article, we will discuss how to append newline to StringBuffer There are ways to append newline to StringBuffer or StringBuilder object, we will Read More
In this article, we will discuss how to clear or delete StringBuffer contents 1. Clearing StringBuffer contents: Here, Start-index for the contents i.e.; 0 end-index Read More
In this article, we will discuss difference between String, StringBuffer and StringBuilder in detail with example on performance Let us move forward and discuss difference Read More
In this article, we will discuss difference between StringBuffer and StringBuilder in detail with example Both are mutable sequence of characters to replace String’s immutability Read More
In this article, we will discuss difference between String and StringBuffer in detail with examples 1. String v/s StringBuffer: String StringBuffer String is immutable StringBuffer Read More
In this article, we will discuss how to convert String to StringBuilder and vice-versa Note: String to StringBuffer conversion is also possible, read StringBuffer to String Read More
In this article, we will discuss how to convert String to StringBuffer and vice-versa Note: String to StringBuilder conversion is also possible, read StringBuilder to String conversion Read More
In this article, we will discuss StringBuilder’s substring() method which is used to get sub-string (partial string or portion of string from StringBuilder as per specified range) Read More
In this article, we will discuss StringBuilder’s reverse() method which is used to reverse the contents of invoking StringBuilder object 1. StringBuilder’s reverse() method : This StringBuilder Read More
In this article, we will discuss StringBuilder’s replace() method which is used to replace portion of string or sub-string with specified string 1. StringBuilder’s replace() method : Read More
In this article, we will discuss how to get length of StringBuilder object using StringBuilder’s length() method 1. StringBuilder’s length() method : This StringBuilder method is used Read More
In this article, we will discuss StringBuilder’s lastIndexOf() method which returns last occurrence of specified sub-string 1. StringBuilder’s lastIndexOf() method : This method is used to Read More
In this article, we will discuss StringBuilder’s insert() method which is used to insert specified argument at the specified offset (or say starting from specified Read More
In this article, we will discuss StringBuilder’s indexOf() method which returns first occurrence of specified sub-string 1. StringBuilder’s indexOf() method : This method is used to Read More
In this article, we will discuss StringBuilder’s ensureCapacity() method which ensures capacity is at least equal to specified minimum capacity 1. StringBuilder’s ensureCapacity(int) method : Read More