Skip to main content

Generics and Collections Framework

  • Chapter
Book cover Object-Oriented Programming and Java

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics