Arithmetics is basic maths in Java. In this section, we will go over the main maths operators as well as some special ones. We will also go over a special concept called casting.
BASIC OPERATORS
Modulus is the reminder after division
ex 7 % 6 = 1
We also always follow BEDMAS in java
1. ()
2. *, / or %
3. + or -
EXTRA OPERATORS
Concatenation allows us to combine two elements in a print statement.
CASTING
Casting means to change the type of a variable. EX; you could change a float or double to an integer.
NEXT STEP
created with
Website Builder Software .