Java in 21 Days (7th Edition) Day 6: Packages, Interfaces, and Other Class Features

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

Home Feedback Other Books Previous Day Next Day

Notes and Corrections

  • View the Certification Practice quiz solution
  • Certification answer: Answer (b) is correct. All three of these instance variables are available for use in the EvenMoreInformation class. The quantity variable is defined in the class, so it can be accessed within the class. The duration variable is defined in the Information class with the public modifier, so it can be accessed from any other class. The rate variable is defined in the Information class with the protected modifier, so it can be accessed from that class and any of its subclasses, even if they do not belong to the same package.

Source Files

Activities