Types
- Type: set of values and the operations that can be applied to the
values
- Strongly typed language: compiler and run-time system check that
no operation can execute that violates type system rules
- Compile-time check
Employee e = new Employee();
e.clear(); // ERROR
- Run-time check:
e = null;
e.setSalary(20000); // ERROR