Using Arrays
This section is based on parts 3, 4 and 5 of the notes,
Arrays in Java, part 1,
Arrays in Java, part 2,
and
Arrays in Java, part 3.
Practical exercises supporting this section are in
Exercise sheet 2.
When you have completed this section you should be able to:
- Write Java code in which variables referring to arrays are declared
- Write Java code in which arrays are created, searched and modified
- Write Java static methods which take arrays as arguments
- Appreciate the importance of specifying a method's behaviour
- Understand the difference between a copy and an alias of an array
- Understand the difference between modifying an array constructively
and destructively
- Recognise the difference between a value which is stored in an array and
a value which is an index to an array cell
- Appreciate how variables in a method call may alias arrays outside
the method call
Matthew Huntbach
Last modified: 30 June 2006