Using Objects

Two Kinds of Data. Java splits all data into two families: primitive types and reference types (objects). Knowing which is which controls how values are stored, copied, and compared. Primitive Types. The AP CSA Java subset uses three primitives: - int : whole

8 lessons, each with runnable code in the browser.

  1. Objects vs Primitives
  2. Creating Objects with new
  3. String Length and Substring
  4. indexOf and String Search
  5. Comparing Strings: equals and compareTo
  6. The Math Class
  7. Wrapper Classes: Integer and Double
  8. References vs Values in Method Calls

Compilearn home