Summary
Chapter eight introduces arrays. Arrays allow you to store multiple values in a single variable. Arrays consist of zero or more elements. Each element is a value. An array is the collection of values. In this chapter you learn how to create arrays, modify them, and iterate through an array’s elements.
Chapter Slides
Try It – Step by Step
- Creating Arrays
- Accessing Elements
- Displaying Arrays
- Copying Arrays
- Array Length
- Array Traversal
- Random Numbers
- Traverse and Count
- Building a Histogram
- The Enhanced for Loop
Supplementary Material
Both Udacity and LearningLad have videos explaining the concepts presented in this chapter. The videos by Udacity covers both looping and arrays and is more instructional in nature. The videos by LearningLad cover arrays only and are more tutorial in nature. You should watch both sets of videos.
Udacity
Refer to this playlist for videos on Looping and Arrays. The playlist here covers both looping and arrays. It is a good supplement to this chapter and the previous chapter.
LearningLad
Refer to these videos by LearningLad for more information on Java arrays.
- Arrays Overall
- Initializing Arrays
- Arrays and User Input
- Copying Arrays
- The For Loop and Arrays