© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
M. IndenJava Challengeshttps://doi.org/10.1007/978-1-4842-7395-1_4

4. Strings

Michael Inden1  
(1)
Zurich, Switzerland
 

Strings are character sequences that offer a variety of methods. In this chapter, you will learn about this topic and practice through various exercises.

4.1 Introduction

For processing strings there are the classes String, StringBuffer, and StringBuilder. All three satisfy the interface java.lang.CharSequence.

4.1.1 The Interface CharSequence

The read-only interface CharSequence mainly provides indexed access to single characters of type char as well as to character sequences, which in turn are of type CharSequence. The following methods, in ...

Get Java Challenges: 100+ Proven Tasks that Will Prepare You for Anything now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.