Scope problems
- Neither example will compile
- In the first example, the variable "i" has been declared twice
- In the second example, the variable "x" cannot be referenced outside the
loop in which it was declared
- Ideas for improvement:
- Emphasize that giving the type name for a variable creates it
- Have students practice tracing the values of variables in sample code
(next)