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

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

Dive into the depths of Java with our quiz based on "Thinking in Java, Fourth Edition" by Bruce Eckel. Test your knowledge, solidify concepts, and prepare for certification with challenging questions and insightful feedback.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which interfaces does NRobot implement?

  1. Null

  2. Robot

  3. Both Null and Robot

  4. Neither Null nor Robot

The correct answer is: Both Null and Robot

NRobot implements both the Null and Robot interfaces as it is coded to allow for null robots (robots that don't have any specific functionality) and regular robots that have designated functions. Options A and D are incorrect because they specify only one interface, whereas NRobot implements both interfaces. Option B is incorrect because it specifies only the Robot interface, while NRobot also implements the Null interface. Therefore, the correct answer is C.