Chapter 15. Arrays, ArrayList, Map and Random Numbers
In this chapter, we will learn about Java arrays that 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, the ArrayList,
and see the differences between them.
In addition, we will see how to handle data which can be logically linked to an identifier as part of a pair using a Map and we will also build some mini apps to practice these new concepts.
Furthermore we will see how to generate random numbers.
The topics we will cover in this chapter include the following:
- The Random class
- Handling data with arrays
- Arrays mini app
- Dynamic arrays, including mini app
- Multi-dimensional arrays, including mini app
- The
ArrayList
class - The enhanced
for
loop - Java
HashMap
But first, let's learn about the Random
class.