Group Group Group Group Group Group Group Group Group

Chapter 8 - Errata

You can also pass a number into the constructor for these types, for example, to create an array of zeros.
val zeros = DoubleArray(4) // 0.0, 0.0, 0.0, 0.0

The text implies the example will show passing a default value, but the code example does not do this (the 4 is the length of the array, not the default value). This example happens to work because the default value, if one is not provided, is zero. The example should be changed to show a non-zero example and passing that value in the constructor.