Lesson Introduction

Welcome! Today, we're going to delve into the fundamental operations and methods associated with Strings in Java. Strings are the bread and butter for most programs because they're used to represent and manipulate text data. This lesson will enable you to learn about basic string methods and operations in Java such as concatenation, comparison, and most common methods.

Revising String Concatenation

We already know what concatenation is and how it works, but worth revising it quickly! Concatenation means joining things together and is a crucial string operation. In Java, we accomplish this with the + operator or using StringBuilder.

In this case, "Hello, " and "World!" are combined to form one string: "Hello, World!".

Comparing Strings

There are often times when we need to compare Strings. Unfortunately, just a common comparison operators == and < will not work here. To accomplish this in Java, we use the equals() and methods.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal