Beginning of Year Review
AP Computer Science A
Objectives
Variables
Variables
int sum;
Declaration statement
sum = 3.5;
Assignment Statement
Variables
Primitive Data Types
char
Null
boolean
byte
short
int
long
float
double
Check for understanding
Activity:
AP Classroom 1.2 Variables
Numbering Systems
Numbering Systems
Base 10 - decimal
Base 16 - hexadecimal
Base 2 number - binary
Base 8 number - octal
Doubles and Scientific Notation
Casting
Arithmetic Expressions
Arithmetic Expressions
? = a number literal or variable
Arithmetic Expressions
Arithmetic Expressions
Check for Understanding
AP Classroom
1.3 Expressions
Strings
String Concatenation
String Methods
// returns the substring beginning at from and ending at to-1
// returns substring(from, length())
String Methods
// returns the index of the first occurrence of str; returns -1 if not found
// returns a value < 0 if this is less than other
// returns a value = 0 if this is equal to other
// returns a value > 0 if this is greater than other
String to Number Conversion
IMACS Ex. 29
Check for Understanding
AP Classroom 2.7_StringMethods
Booleans
<, <=, >, >=, ==, and !=
Resources
Data Types: Florida Institute of Technology - http://cs.fit.edu/~ryan/java/language/java-data.html
Data Types: Oracle Java Documentation - https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html