List of Things Version B

HOME ISC250

Arrays vs ArrayLists in Java

Arrays are homogenous in Java, meaning that we have to put the same data into it. I.E. if we we have an array of strings, the only thing we can put in there is a string.
ArrayLists allow us to put in generic objects. These objects can be filled with all kinds of different information in the form of attributes.
In this exampe we use an object with a string attribute called name and a url object attribute called url.

List of Things After Customer Interaction

Here you'll notice that when we tapped on the 'Dokken' list item, it loaded the corresponding URL.