You are on page 1of 1

extbook author.

Second, the framework is available for later courses in the


curriculum and beyond. Third,
although the primary emphasis is on using the Java Collections Framework, the
framework classes are not
treated simply as “black boxes.” For each such class, the heading and field are
provided, and one method
definitio is dissected. This exposition takes away some of the mystery that would
otherwise surround the
class, and allows students to see the eff ciency and succinctness of professionals’
code.
The version of the Java Collections Framework we will be working with includes type
parameters.
Type parameters, sometimes called “generic types,” “generics,” or “templates,” were
added to the Java
language starting with Java 5.0. With type parameters, there is no need to downcast
the return value from
a collection, and many errors can be detected at compile-time that previously were
discoverable only at
run-time.
To complement generics, three other features have been added: boxing, unboxing, and
an enhanced
for statement. The elements in generic collections must be objects, often from a
wrapper class such as
Integer. If a primitive value appears where a collection method requires a wrapper
element as an argument, boxing automatically converts the primitive value to the
corresponding wrapper element. C

You might also like