10. Store Information with Arrays

In This Chapter

Create an array

Set the size of an array

Give a value to an array element

Change the information in an array

Make multidimensional arrays

Sort an array

Computers are ideal for the storage, categorization, and study of information.

The most basic way that information is stored in a computer program is by putting it into a variable. So far, all the variables you’ve worked with have been a single item of information, such as a floating-point number or a string.

A list of Minecraft mobs near the player is an example of a larger collection of similar information. To keep track of a list of this kind, you can use arrays.

An array is a group of related variables that share the same type. ...

Get Minecraft Mods Programming Absolute Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.