Chapter 15: Arrays, Maps, and Random Numbers
In this chapter, we will learn about Java arrays, which allow us to manipulate a potentially huge amount of data in an organized and efficient manner. We will also use a close Java relation to arrays, ArrayList, and look at the differences between them.
Once we are comfortable handling substantial amounts of data, we will see what the Android API has to offer to help us easily connect our newfound data-handling skills to the user interface without breaking a sweat.
The topics in this chapter include the following:
- The
Randomclass - Handling data with arrays
- Arrays mini-app
- Dynamic arrays including a mini-app
- Multidimensional arrays including a mini-app
- The
ArrayListclass - The enhanced
forloop - The Java HashMap
First, let's learn about the Random class.