Primitive Types

What Is a Primitive Type? In Java every value lives in a typed variable. A primitive type stores a single, simple value directly in memory, not a reference to an object. The AP Computer Science A exam uses only three primitive types: - int : whole numbers like

8 lessons, each with runnable code in the browser.

  1. Meet the Primitive Types
  2. Literals and Naming
  3. Integer Arithmetic and Output
  4. Integer vs Double Division
  5. The Modulus Operator
  6. Operator Precedence
  7. Casting Between Types
  8. Compound Assignment Operators

Compilearn home