Java’s standard library doesn’t provide a direct method to capitalize entire strings in one go, but you can accomplish this with a combination of built-in methods.
Here’s the down-and-dirty on how to concatenate strings in Java.
The String class in Java has a nifty toLowerCase() method that does the hard work for you.
String
toLowerCase()
In Java, we often use the String.replaceAll() method with a regex pattern to delete characters.
String.replaceAll()
Extracting a substring in Java is straightforward using the substring method.
substring
Java strings have a length() method.
length()
Java introduced String.format() for interpolation.
String.format()
Let’s yank those pesky quotes out of our text.
Searching and replacing in Java is a breeze thanks to the String class and its replace() method.
replace()
Java’s built-in support for regex is primarily through the Pattern and Matcher classes in the java.util.regex package.
Pattern
Matcher
java.util.regex