Java Collections and
Generics
·
The
Java Collections Framework
·
Java
Generics
13.1. The Java
Collections Framework
·
Java
arrays have limitations.
o They cannot
dynamically shrink and grow.
o They have limited
type safety.
o Implementing
efficient, complex data structures from scratch would be difficult.
·
The
Java Collections Framework is a set of classes and interfaces implementing
complex collection data structures.
o A collection is
an object that represents a group of objects.
·
The
Java Collections Framework provides many benefits:
o Reduces programming
effort (already there)
o Increases performance
(tested and optimized)
o Part of the core API
(available, easy to learn)
o Promotes software
reuse (standard interface)
o Easy to design APIs
based on generic collections