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.


What term best describes the practice of using existing types to create a new type?

  1. Abstraction

  2. Encapsulation

  3. Inheritance

  4. Composition

The correct answer is: Composition

One possible explanation could be The term that best describes the practice of using existing types to create a new type is composition. This means combining different types to create a new type that has its own unique set of features. Using abstraction involves hiding complex implementation details, while encapsulation is the practice of keeping related data and behavior together. Inheritance involves creating new types based on existing types, but the resulting type still has some similarities to the original type. However, composition allows for more flexibility and freedom in creating new types by incorporating features from multiple existing types.