Abstract
Prior to Java version 1.5, a Java class could only be written with its attribute and parameter types in mind. One could never translate a type-independent concept into a class. With the introduction of Java Generics in Java 2 version 1.5, we can define a class without specifying the type for certain attributes and/or parameters. The type is specified when the class is instantiated. In this chapter you will learn how to use this feature of Java. You will also learn about the Java Collections framework that has a predefined set of generic classes and algorithms that can be used to store and manipulate a collection of objects.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag London Limited
About this chapter
Cite this chapter
Poo, D., Kiong, D., Ashok, S. (2008). Generics and Collections Framework. In: Object-Oriented Programming and Java. Springer, London. https://doi.org/10.1007/978-1-84628-963-7_12
Download citation
DOI: https://doi.org/10.1007/978-1-84628-963-7_12
Publisher Name: Springer, London
Print ISBN: 978-1-84628-962-0
Online ISBN: 978-1-84628-963-7
eBook Packages: Computer ScienceComputer Science (R0)