Array Idioms

Review the introduction.

Then more ways of using arrays, in particular common array coding techniques (also known as idioms). Here are the slides.

Here are two programs that demonstrate idioms:

  1. CountHonours.java
  2. Num70.java

The Sieve of Eratosthenes is a famous application of arrays even though Eratosthenes died more than 2000 years before computers were invented.