Summary
The idea that sometimes things don't go your way is important as a guide during development. You can strive for optimal flexibility, but you can only do so much to loosen the binds of your architecture while keeping it structurally sound. As revealed through the Vector class, you must make do with what your foundations allow. You must strive for loosely coupled relationships among your objects, perhaps by downcasting to Object. If this is the case, you need to use compile-time and runtime errors to help fix mismatches among Object casting. Always do what is best to keep your application on track.
Understanding the impact of an object in your language is a great strength. It enables you to realize potential weaknesses the object may have ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access