Lecture 18, CS 302-7 and 8, March 2 2012
- Reminders
- Exam
1 March 8
i.
By end of class today will have covered everything on exam
1.
no 2d arrays on exam
- Program
2 March 16
i.
Pairs by march 9
- Review
- Variable
scope
- Call
stack tracing
- Arrays
as parameters
- Passing
arrays
- Last
time, we used an array as a parameter
- You
can also return arrays:
- Example
- PassingAndReturning.java
- Example
ArrayPassing.java
- Side
note Strings are kind of weird
i.
They are objects (not primitives) but they behave like
primitives when we pass them with methods.
ii.
They are whats referred to as immutable.
- 2d
arrays
i.
example chess board
- HW
program 2, study for exam