CS 106A Chapter Notes - Chapter 3: Binary Operation, Operand, Negative Number
Document Summary
Ch 3 expressions: expression = symbolic representation in programming language of sequence of operations needed to produce result a. i. combination of variables and + operator is example n1 + n2 a. ii. a. iii. compoased of terms and operators. Method call = values from calling other methods that return data values to original expression readint a. iii. 4. Expression in parentheses = same like in math a. iv. Tools to mainuplate values: primitive types c. i. c. ii. c. iii. c. iv. First 4 types (byte, short, int, long ) are integers. Boolean has domain of 2 values: true and false. String: use values without considering underlying structure c. iv. 1: constants and variables, constants. Easier to write more interactive programs a. i. a. ii. Pi can be presented in floating point approximation (round at certain number) Make obvious to the reader the purpose b. i. 1. a. b. i. 1. b. b. i. 1. c. b. i. 1. d. b. i. 1. e. b. i. 2. b. i. 3. Local variables = variables declared inside method b. ii. 1. Available only to that method, not other parts of code.