Java Strings

Explains how to declare, create, compare, and use Strings in a Java program.

Prerequisites

Objectives

Key Concepts

Declaring a String

Creating a String

String Concatenation

Getting the Length of a String

Retrieving a Character from a String

Comparing Strings

Other String Methods

There are many other useful String methods, including the following: