Book 4
Strings, Arrays, and Collections
Contents at a Glance
Chapter 1: Working with Strings
Reviewing Strings
Using the String Class
Using the StringBuilder and StringBuffer Classes
Using the CharSequence Interface
Chapter 2: Using Arrays
Understanding Arrays
Creating Arrays
Initializing an Array
Using for Loops with Arrays
Solving Homework Problems with Arrays
Using the Enhanced for Loop
Using Arrays with Methods
Using Varargs
Using Two-Dimensional Arrays
Working with a Fun but Complicated Example: A Chessboard
Using the Arrays Class
Chapter 3: Using the ArrayList Class
Understanding the ArrayList Class
Creating an ArrayList Object
Adding Elements
Accessing Elements
Printing an ArrayList
Using an Iterator
Updating Elements
Deleting Elements
Chapter 4: Using the LinkedList Class
Understanding the LinkedList Class
Creating a LinkedList
Adding Items to a LinkedList
Retrieving Items from a LinkedList
Updating LinkedList Items
Removing LinkedList Items
Chapter 5: Creating Generic Collection Classes
Why Generics?
Creating a Generic Class
A Generic Stack Class
Using Wildcard-Type Parameters
A Generic Queue Class
Chapter 6: Using Bulk Data Operations with Collections
Looking At a Basic Bulk Data Operation
Looking Closer at the Stream Interface
Using Parallel Streams