1.10 Wrapper Classes
Introduction
Every primitive type has a corresponding wrapper class in `java.lang` — `int`↔`Integer`, `double`↔`Double`, `boolean`↔`Boolean`, and so on. Wrapper classes let primitives be used where an object is required (like in collections such as `ArrayList`), and provide useful static utility methods for parsing and converting values.
Key Concepts
Java Syntax
Code Examples
`42` is autoboxed into an `Integer` object, then unboxed back into an `int`. `Integer.parseInt` converts the text `"17"` into the primitive `int` 17.