Personal tools
You are here: Home Classes Fall 2004 - Spring 2005 CS 150 3.16.05 March 16
Document Actions

March 16

by admin last modified 2005-05-11 13:35

Examples from March 16

Today we went through several programs illustrating arrays.

StringArray.java and SimpleInput.java: This reads strings of text until it gets a blank line, then prints out the list. This is just like SimpleArray.java from 3/14, only it uses Strings rather than ints.

ArrayConstant.java: This illustrates an array constant, the length variable for arrays, and how to pass arrays to a method.

VaryLength.java and SimpleInput.java: This is another version of SimpleArray.java from 3/14, only this expands the array each time it runs out of room. I really did this as an illustration of how to have a method return an array value.

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: