O'Reilly logo

Learning Processing by Daniel Shiffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Arrays

“I might repeat to myself slowly and soothingly, a list of quotations beautiful from minds profound—if I can remember any of the damn things.”

Dorothy Parker

In this chapter:

  • –What is an array?

  • –Declaring an array.

  • –Initialization.

  • –Array operations—using the “for” loop with an array.

  • –Arrays of objects.

Arrays, why do we care?

Let’s take a moment to revisit the car example from the previous chapter on object-oriented programming. You may remember we spent a great deal of effort on developing a program that contained multiple instances of a class, that is, two objects.

     Car myCar1;
     Car myCar2;

This was indeed an exciting moment in the development of our lives as computer programmers. It is likely you are contemplating a somewhat obvious ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required