As you may recall, a
String, which is widely used in Java, is an object that represents a sequence of characters. It is a great way to store information.
Because character strings are so vital to programming, Java dedicated an entire class to them. This is great news for us because the
String class provides a lot of useful methods to help us perform operations on strings and data manipulation.
In this lesson, we will go over several string methods:
Let’s get started!
Run the code in the code editor.
There are three string methods used in this program. We’ll learn about them later, but can you guess what some of them do?