In Chapter 19, we presented data structures that stored and manipulated
object references. This chapter continues our multi-chapter discussion on data structures. You could store any
object in our data structures. One inconvenient aspect of storing
object references occurs when retrieving them from a collection. An app normally needs to process specific types of objects. As a result, the
object references obtained from a collection typically need to be downcast to an appropriate type to allow the app to process the objects correctly. In addition, data of value types (e.g.,
double) must be boxed to be manipulated with
object references, which increases the overhead of processing such data. Most importantly, processing ...