(MAI) List Lesson
List
Apps contain data or information. Data is raw facts while information is data processed into usable form.
All apps have a way to store data. This data could be your location, phone numbers or a high score in a game. One way we keep track of data is by creating list. We create a to do list, a list of names or a shopping list.
List is the data structure used to store data in programming. We use lists to create and manipulate different sets of values/elements stored in index locations.
In Java, an array is a type of list structure. The ArrayList class is an array-based implementation of the List interface. Specifically, all elements of an ArrayList are stored in a Java array. The elements in the list are stored in an index location. In Java the list index location starts at 0. In App Inventor, the index location for list starts at 1.
In App Inventor lists are created by using the make a list block.
How to Make a List
The List Blocks
In the next module you will learn to iterate (loop) through list using iteration.
[CC BY 4.0] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION