Java String Tutorial

String Class is a widely used class in java. String Class represents a bunch of characters and is similar to a character array.

String class has almost a dozen constructors and can be used to create String objects. You can check the constructors at String java doc page. The easiest way to create a String in java is

String str1 = “Hello!!!”;

The String class includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase. Case mapping is based on the Unicode Standard version specified by the Character class.

String internally implements Serializable, CharSequence, Comparable interfaces.
Java String Tutorial | String Sample Code in Java

String tutorials in java

We have created the customized String tutorials in java, that will help you understand the concepts of String pool, String conversions, case operations, sub-strings and much more. Each of the article have details along with sample code. We recommend to go through each of the below links and get a detail idea on how to use String and its methods in your projects.

String initialization and Pool

Conversion Examples



StringBuffer, StringBuilder