Chapter 1

Working with Strings

In This Chapter

arrow Quickly reviewing what you already know about strings

arrow Examining string class methods

arrow Working with substrings

arrow Splitting strings

arrow Using the StringBuilder and StringBuffer classes

arrow Using the CharSequence interface

Strings are among the most common types of objects in Java. Throughout this book are various techniques for working with strings. You've seen how to create string variables, how to concatenate strings, and how to compare strings. But so far, I've only scratched the surface of what you can do withstrings. In this chapter, I dive deeper into what Java can do with string.

I start with a brief review of what I've covered so far about strings, so that you don't have to go flipping back through the book to find basic information. Then I look at the String class itself and some of the methods it provides for working with strings. Finally, ...

Get Java All-in-One For Dummies, 4th Edition 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.