CS 101 Notes: 9/7/2010 Arithmetic operations in JAVA * multiplication / division + addition - subtraction 7 - 5 value1 - value2 - change sign -6 - 9 - value3 ++ increment ++value4 value5++ -- decrement --value4 value5-- ( ) parentheses 8 + 7 * 5 (8 + 7) * 5 % modulus - remainder from an integer division 8 R 3 ---- 5| 43 Precedence 1. ( ) 2. * / % 3. + - Division in depth value1 = 43 / 5; Since the two operands are both integers, We get an integer result (i.e. integer division) value2 = 43.0 / 6.0; In the second example, the two operands are floating point numbers (i.e. there is a decimal POINT in the number), we get a floating point result (i.e. floating point division) Basic Types in Java int - positive and negative integer values ranging from about -2 billion to +2 billion float - positive and negative floating point values double - positive and negative floating point values with more precision than "float" boolean - values that are either true or false char - a single character that can be typed in from a keyboard String - a collection/sequence of characters