Home Page
>
Learning the Java Language
>
Object-Oriented Programming Concepts
The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
Answers to Questions and Exercises: Object-Oriented Programming Concepts
Answers to Questions
- Real-world objects contain state and behavior.
- A software object's state is stored in fields.
- A software object's behavior is exposed through methods.
- Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data encapsulation.
- A blueprint for a software object is called a class.
- Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.
- A collection of methods with no implementation is called an interface.
- A namespace that organizes classes and interfaces by functionality is called a package.
- The term API stands for Application Programming Interface.
Answers to Exercises
- Your answers will vary depending on the real-world objects that you are modeling.
- Your answers will vary here as well, but the error message will specifically list the required methods that have not been implemented.