previous | start | next

## Wrapper Classes

- Primitive types aren't classes
- Use wrappers when objects are expected
- Wrapper for each type:

      Integer Short Long Byte
      Character Float Double Boolean

- Auto-boxing and auto-unboxing`
  `

      ArrayList<Integer> numbers = new ArrayList<Integer>();
      numbers.add(13); // calls new Integer(13)
      int n = numbers.get(0); // calls intValue();

previous | start | next