Multi-dimensional Arrays and Variable Length Argument Lists


Outline

  1. Review from lab

  2. Finish last class examples, Lengths and MonthDays

  3. Introduce variable length argument lists 

  4. Exercise 

Multi-dimensional arrays

Examples:
  1. CorpSales.java - Demonstrates creating and filling a two dimensional array with primitive values and then totalling all elements.
  2. Lengths.java - Demonstrates the use of the length attribute and initializer lists with two dimensional arrays.
  3. MonthsDays.java - Demonstrates the array of array nature of multidimensional arrays.  The "rows" don't have to be of the same length.
  4. Variable length argument lists - 1, 2, 3, 4
Ragged Array - An array of arrays in which the rows are of different sizes.  

CS 239 - Spring 2010
Department of Computer Science Nancy Harris Home Page Current Classes Link