© Kishori Sharan 2018
Kishori SharanJava Language Featureshttps://doi.org/10.1007/978-1-4842-3348-1_12

12. Collections

Kishori Sharan1 
(1)
Montgomery, Alabama, USA
 
In this chapter, you will learn:
  • What collections are

  • What the Collections framework is and its architecture

  • Different ways for traversing elements in a collection

  • Different types of collections such as List, Set, Queue, Map, etc.

  • Applying algorithms to collections

  • Obtaining different views of a collection

  • Creating empty and singleton collections

  • How hash-based collections work internally

All example programs in this chapter are members of a jdojo.collections module , as declared in Listing 12-1.

// module-info.java
module jdojo.collections {
    exports com.jdojo.collections;
}
Listing 12-1.

The ...

Get Java Language Features: With Modules, Streams, Threads, I/O, and Lambda Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.