Arrays

  • Array
  • Bounds checking

In the grand tradition of computer science, the terminology here is confusing. The terms “array,” “list,” “vector,” and “tuple” can all means “an ordered sequence of items indexed by number.” These terms appear across many languages, but their meaning varies a great deal from language to language.

The particular distinction between lists and arrays that Java makes is a Java-specific thing. For example, Swift, Ruby, and JavaScript all have things that they call an “array” that are resizable, and resemble Java lists much more than Java arrays.

The moral here is to learn the terminology of the language you’re using, and be aware that computer science is a young and inconsistent discipline.

  • What are the differences between an array and a list in Java?
  • What is the point of having arrays if Java already has lists?

What was particularly interesting, confusing, or exciting to you in this reading?