Class NameList

java.lang.Object
  |
  +--NameList

public class NameList
extends java.lang.Object

This class is a simple example of creating, initializing, and using an array.


Constructor Summary
NameList(int count)
          The NameList class manages an array of names.
 
Method Summary
 java.lang.String getName(int idx)
          retrieve the name at a particular index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameList

public NameList(int count)
The NameList class manages an array of names.

Parameters:
count - number of strings in the array
Method Detail

getName

public java.lang.String getName(int idx)
retrieve the name at a particular index

Parameters:
idx - the index of the desired name
Returns:
The name at that index, or "Unknown" if idx is out of range