© Doug Winnie 2021
D. WinnieEssential Java for AP CompScihttps://doi.org/10.1007/978-1-4842-6183-5_56

56. I Don’t Collect Those; Too Abstract

Doug Winnie1  
(1)
Mission Hills, KS, USA
 

When you play a role-playing game, you work together as a team with other people. This could be with other players in the same room in real life or simulated characters in a computer game. A party is a collection, a group of people who have something in common.

In Java, we can create collections using arrays or ArrayLists. These collections can be of everything, and we can use them to create collections of things that we define ourselves using classes. Java collections aren’t limited to things that are just in the core language—they can be instances of objects that we ...

Get Essential Java for AP CompSci: From Programming to Computer Science 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.