October 2014
Beginner to intermediate
285 pages
6h 24m
English
In this chapter you’ve learned the difference between local and global variables. You can use a simple Array or the more flexible ArrayList to store a pile of data, and traverse it using a for-each iterator.
Arrays are great if you don’t really care about finding one of the objects in the array by itself. However, if you care about objects by name—like a Player—then you’ll need something a little fancier.
In the next chapter we’ll cover how to use a HashMap to store data by name (or by Location, or by anything else you might need).
Read now
Unlock full access