nature-of-code / noc-book

The Nature of Code book (archived repo, see README for new repo / build system!)

Home Page:http://natureofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chapter 1.4 - Java utils used for Random class not automatically imported in Processing 3

loeffe opened this issue · comments

Chapter 1.4 states:

"Luckily for us, to use a normal distribution of random numbers in a Processing sketch, we don’t have to do any of these calculations ourselves. Instead, we can make use of a class known as Random, which we get for free as part of the default Java libraries imported into Processing"

I found this to be not the case in Processing 3.0 (Mac), where you have to manually import java.util.* library before using the Random class:

import java.util.*;