Posts related to tag: string


Java 8– Find first and all smallest string in List

Using the Java 8 Stream API min method, you can find the first and all smallest strings from a List. […] Continue reading »

String intern() method in Java

In Java, the String class is one of the most fundamental classes, offering a wide array of methods to manipulate […] Continue reading »

Remove All Special Character from String in Java

In Java, to remove all special character form a given string, we can use the replaceAll(String regex, String replacement) method […] Continue reading »

Find second index of a substring in a String in Java

In Java, we can use the overloaded method indexOf(String str, int fromIndex) of the String class to get the second […] Continue reading »

Difference between trim() and strip() methods in Java

In this article, you will learn the difference between trim() and strip() methods of the String class in Java. trim() […] Continue reading »

Java – isBlank() vs isEmpty() method of String class

In this short article, you will get to know about the difference between the isBlank() and isEmpty() methods of the […] Continue reading »

Java 11- New Methods of String Class

Java 11 (JDK 11) added a few new utility methods in the String class. These utility methods will reduce the […] Continue reading »

Capitalize the first letter of each word in a String using Java

On this page, we will learn how to capitalize the first letter of each word in a String using Java. […] Continue reading »

Java – Capitalize the first letter of a String

In this short tutorial, you will get an idea of how to capitalize the first letter of a string. In […] Continue reading »

Java- Find all Capital Letters in the String

In this short tutorial, we’ll find all the capital letters in the given String using Java. Character.isUpperCase(char ch) returns true […] Continue reading »

Find first repeated character in a string using Java

This tutorial will help you to find the first recurring or repeated character in a given string. By asking these […] Continue reading »

1 2