Java in 21 Days (6th Edition) Day 8: Data Structures

The cover of Teach Yourself Java in 21 Days (6th Edition) by Rogers Cadenhead

Home Feedback Other Books Previous Day Next Day

Notes and Corrections

  • View the Certification Practice quiz solution
  • Certification answer: Answer (d) is correct. This class uses recursion, the technique of calling a method within itself. Calling getValue(17) causes getValue(34) to be called, which causes getValue(68) to be called, which causes getValue(136) to be called. Because 136 is greater than 100, getValue() will return that value instead of calling itself again.

    Answers (a), (b), and (c) are incorrect.

Source Files

Activities