Spec-Zone .ru
спецификации, руководства, описания, API
Trail: Learning the Java Language
Lesson: Object-Oriented Programming Concepts
Home Page > Learning the Java Language > Object-Oriented Programming Concepts

Answers to Questions and Exercises: Object-Oriented Programming Concepts

Answers to Questions

  1. Real-world objects contain state and behavior.
  2. A software object's state is stored in fields.
  3. A software object's behavior is exposed through methods.
  4. Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data encapsulation.
  5. A blueprint for a software object is called a class.
  6. Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.
  7. A collection of methods with no implementation is called an interface.
  8. A namespace that organizes classes and interfaces by functionality is called a package.
  9. The term API stands for Application Programming Interface.

Answers to Exercises

  1. Your answers will vary depending on the real-world objects that you are modeling.
  2. Your answers will vary here as well, but the error message will specifically list the required methods that have not been implemented.
« PreviousTOC

Problems with the examples? Try Compiling and Running the Examples: FAQs.
Complaints? Compliments? Suggestions? Give us your feedback
.

Previous page: Questions and Exercises: Object-Oriented Programming Concepts