Summary
In this chapter, we looked at how to use simple Java arrays to store substantial amounts of data provided it is of the same type. We also used the
ArrayList
class, which is like an array with loads of extra features. Furthermore, we found out that both arrays andArrayList
instances are polymorphic, which means that a single array (orArrayList
) can hold multiple different objects as long as they are all derived from the same parent class.In addition, we learned about the
HashMap
class, which is also a data storage solution but allows access in different ways.In the next chapter, we will learn about the
Adapter
andRecyclerView
classes to put our theory into practice and enhance the Note to Self app.