Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Mastering Java: The Ultimate Quiz for 'Thinking in Java'. Dive deep into Java with multiple-choice questions. Challenge yourself with quiz questions designed to test and improve your understanding of the 'Thinking in Java' book. Get ready for your exam!

Practice this question and more.


What is the initial color of the traffic light?

  1. GREEN

  2. YELLOW

  3. RED

  4. None

The correct answer is: RED

The initial color of the traffic light is red because it is the first color in the typical traffic light sequence. The other options are incorrect because they are not the first color in the sequence. Green is paired with yellow to indicate "go" and "caution", while yellow is paired with red to indicate "caution" and "stop". Additionally, the option "None" is incorrect because it is not a color in the traditional traffic light sequence.