Primitive Data Types
Eight types: int (32-bit), double (64-bit float), boolean (true/false), char (16-bit Unicode), byte, short, long, float. Store values directly in memory.
Example: int score=95; double gpa=3.85; boolean pass=true;

Read the notes, then try the practice. It adapts as you go.When you're ready.
Session Length
~20 min
Adaptive Checks
18 questions
Transfer Probes
9
Java is a statically typed, object-oriented programming language used in AP Computer Science A. Understanding primitive data types and objects forms the foundation of all Java programming. Java provides eight primitive types: int, double, boolean, char, byte, short, long, and float.
Objects are accessed through reference variables that store memory addresses. The String class provides methods for text manipulation. Primitives copy values while references copy addresses.
Type casting includes widening (automatic, int to double) and narrowing (explicit cast, double to int). The Math class provides static methods, and wrapper classes enable autoboxing.
One step at a time.
Adjust the controls and watch the concepts respond in real time.
Eight types: int (32-bit), double (64-bit float), boolean (true/false), char (16-bit Unicode), byte, short, long, float. Store values directly in memory.
Example: int score=95; double gpa=3.85; boolean pass=true;
Store memory addresses pointing to heap objects. Can hold null. Assignment copies the reference, not the object.
Example: String name="Alice"; String copy=name; // same object
Immutable character sequence. Methods: length(), substring(), indexOf(), equals(), compareTo(). Modification returns new Strings.
Example: "Hello".length() returns 5. "Hello".substring(1,3) returns "el".
Widening (int to double) is automatic. Narrowing (double to int) requires explicit cast and truncates.
Example: double y=7; // widening. int b=(int)9.8; // 9
Static methods: abs(), pow(), sqrt(), random()[0.0,1.0), min(), max().
Example: int die=(int)(Math.random()*6)+1; // 1-6
Both int operands: truncates decimal. Modulus (%) returns remainder.
Example: 7/2=3; 7%2=1; 7.0/2=3.5
Auto-conversion between primitives and wrappers (int/Integer). Enables primitives in ArrayList.
Example: Integer w=42; int u=w;
Choose a different way to engage with this topic β no grading, just richer thinking.
Explore your way β choose one:
See how the key ideas connect. Nodes color in as you practice.
Walk through a solved problem step-by-step. Try predicting each step before revealing it.
This is guided practice, not just a quiz. Hints and pacing adjust in real time.
Small steps add up.
What you get while practicing:
The best way to know if you understand something: explain it in your own words.
More ways to strengthen what you just learned.