Mastering Java: String Manipulation (Using BlueJ)
A string is data type used to represent text. It is comprised of a set of alphanumeric characters. The Java platform
provides the string class to create and manipulate strings. Java uses strings as built-in objects and provides a lot of
features that eases the process of String handling. The Java String class has various functions designed for comparing
strings, searching substrings, concatenating strings and changing the case of letters within a string.
Java offers three classes to work with character data.
1. CHARACTER CLASS
It is a class whose instance or objects can hold single character data. It offers various methods to manipulate or
inspect single character data.
2. STRING CLASS
It is a class whose objects can hold an unchanging string i.e., once initialized its contents cannot be changed.
3. STRINGBUFFER CLASS
It is a class whose objects can hold strings that can be changed or modified.