
Java – String replace() method
In this article, we will discuss different variants of replace methods to replace character/substring with another new string using String’s replace() method 1. String’s replace() Read More
In this article, we will discuss different variants of replace methods to replace character/substring with another new string using String’s replace() method 1. String’s replace() Read More
In this article, we will discuss regionMatches() method of String class which is used to check whether two substrings are same or NOT 1. String’s regionMatches() method: Read More
In this article, we will discuss matches() method of String class which is used to compare invoking string with the specified regex 1. String’s matches() method: This Read More
In this article, we will discuss how to get length of the String using String’s length() method 1. String’s length() method: This String method is Read More
In this article, we will discuss different variants of last index of methods to get last occurrence of character/substring using String’s lastIndexOf() method 1. String’s Read More
In this article, we will discuss how to join all strings using delimiter specified in the String’s join() method 1. String’s join() method: This String Read More
In this article, we will discuss how to check whether string is empty or NOT using String’s isEmpty() method 1. String’s isEmpty() method: This String Read More
In this article, we will discuss intern() method of String class which is used to return interned string 1. String’s intern() method: This String method is used Read More
In this article, we will discuss various ways to split string using delimiter in Java i.e.; Various ways to split string on the basis of delimiter: Read More
In this article, we will discuss various ways to reverse a String in Java i.e.; 1. Various ways to reverse String contents: reverse() method of StringBuffer/StringBuilder Read More
In this article, we will discuss how to sort contents of ArrayList using sort() method of List in Java 8 Until Java 1.7 version: To Read More
In this article, we will discuss how to construct or create an immutable class step-by-step This is one of the favorite interview questions for fresher and Read More
In this article, we will discuss different variants of index of methods to get first occurrence of character/substring using String’s indexOf() method 1. String’s indexOf() method: Read More
In this article, we will discuss how to get hash code for any string using String’s hashCode() method 1. String’s hashCode() method: This String method Read More
In this article, we will discuss how to convert String into character array using String’s getChars() method 1. String’s getChars(int srcBegin, int srcEnd, char dst[], Read More
In this article, we will discuss couple of variant methods of String to convert/encode the string into equivalent byte array 1. String’s getBytes() method: This Read More
In this article, we will discuss formatting a string using String’s format() method 1. String’s format(String format, Object… args) method: This String method is used Read More
In this article, we will discuss string comparison using String’s equalsIgnoreCase() method, which ignores case differences while comparing 2 string contents 1. String’s equalsIgnoreCase(Object anObject) Read More
In this article, we will discuss string comparison using String’s equals() method 1. String’s equals(Object anObject) method: This String method is used to perform string Read More
In this article, we will discuss how to test whether a string ends with particular character sequence (another string or suffix) using String’s endsWith() method Read More