Appendix. Answers to “Twist in the Tale” exercises
Chapters 1–12 include numerous “Twist in the Tale” exercises. The answers to these exercises are given in this appendix, with comprehensive explanations. The answer to each exercise includes the following elements:
- Purpose— The aim of the exercise (the twist to which each exercise is trying to draw your attention)
- Answer— The correct answer
- Explanation— A comprehensive explanation of the answer
Let’s get started with the first chapter.
A.1. Chapter 1: Java class design
Chapter 1 includes 4 “Twist in the Tale” exercises.
A.1.1. Twist in the Tale 1.1
Purpose: This exercise demonstrates how decreasing the accessibility of an entity by changing its access modifier might impact the code ...