Incremental Java
Primitive Types

Introduction

Last time, we said a type is a set of values. A box can only hold one value from the set. We can change this value and write a new value from the set. We're not allowed to use values that are not in the set.

Here are some of the more important types in Java: int, double, and char.

These three types fall into a category of types called primitive types. We'll explain why they're called primitive types once we introduce object types.