Answers to Self-Study Questions for Sequences

Test Yourself #1

Part (a)

Part (b)

Test Yourself #2

Question 1:

Question 2: The moveItemsRight method can be implemented using a loop to move the items, like this:

It can also be implemented using System.arraycopy, like this: