Skip to content

Glossary: Java Basics

getOrDefault

A map method that returns the value for a key, or a default you choose if the key is missing. It avoids the `null` that `get` would return.

Where the book teaches it

Related terms

Mapnull