Lesson 1.1 · College Board Unit 1
Primitive Expressions
The operand types determine arithmetic before assignment takes place. Multiplication and division precede addition; parentheses change grouping.
Code Scholars Tutoring · AP Computer Science A
The arithmetic layer everything else sits on. Most of this unit is one rule with wide consequences: Java decides the type of an expression before it decides the value, and integer division discards the remainder rather than rounding.
Lesson 1.1 · College Board Unit 1
The operand types determine arithmetic before assignment takes place. Multiplication and division precede addition; parentheses change grouping.
Lesson 1.2 · College Board Unit 1
Integer division truncates toward zero. The remainder has the sign of the dividend; division and remainder can separate decimal digits.
Lesson 1.3 · College Board Unit 1
Cast before division to preserve a fraction. Math.random returns a double from 0 inclusive to 1 exclusive; the integer range width is high - low + 1.
Lesson 1.4 · College Board Unit 1
The + operator adds numeric operands and concatenates when either operand is a String. Evaluate equal-precedence + operations from left to right.
Work through questions with a tutor and get help with the steps you find difficult.
Get help with this topic