Manipulating Variables Flashcards
1
Q
Increment and Decrement Operator
A
Increment Operator: ++ (will increase value by one)
Decrement Operator: – (will decrease value by one)
2
Q
How does int division work?
A
Will divide numbers regularly and floor remainders
3
Q
Arithmetic Exception Error
A
Occurs when you try and divide a number by zero
4
Q
Modulo Operator
A
Gives the remainder after two numbers are divided
5
Q
Compound Assignment Operator
A
num += 8
6
Q
.equals()
A
Compares objects such as strings, and sees if they are the same
7
Q
Final Keyword
A
Will make a variable unchangeable
Example:
final int yearborn = 1986
8
Q
A