Skip to Content
Modern Java in Action
book

Modern Java in Action

by Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft
October 2018
Intermediate to advanced
592 pages
19h 49m
English
Manning Publications
Content preview from Modern Java in Action

Appendix B. Miscellaneous library updates

This appendix reviews the main additions to the Java 8 library.

B.1. Collections

The biggest update to the Collections API is the introduction of streams, which we discussed in chapters 4, 5, and 6. There are also other updates discussed in Chapter 9 and additional minor additions summarized in this appendix.

B.1.1. Additional methods

The Java API designers made the most out of default methods and added several new methods to collection interfaces and classes. The new methods are listed in table B.1.

Table B.1. New methods added to collection classes and interfaces

Class/interface

New methods

Map getOrDefault, forEach, compute, computeIfAbsent, computeIfPresent, merge, putIfAbsent, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Well-Grounded Java Developer, Second Edition

The Well-Grounded Java Developer, Second Edition

Benjamin Evans, Martijn Verburg, Jason Clark
Java in a Nutshell, 8th Edition

Java in a Nutshell, 8th Edition

Benjamin J. Evans, Jason Clark, David Flanagan
Java in a Nutshell, 7th Edition

Java in a Nutshell, 7th Edition

Benjamin J. Evans, David Flanagan
Java Coding Problems

Java Coding Problems

Anghel Leonard

Publisher Resources

ISBN: 9781617293566Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link