Java Reference
In-Depth Information
This method cycles the light through the colors. First, it sleeps an appropriate amount
of time, based on the current color. Then, it calls
changeColor( )
to change to the
next color in the sequence.
5
. Now, add the
changeColor( )
method, as shown here: