March 16
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.