In my assignment, the contractors, i must implement the following
find method. They state:
// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int[] find(String[] criteria);
I have a few questions:
1. I am not understanding why the criteria is an array. When I think of
a criteria I think of some
string value. So my question is what exactly
is criteria holding? Is each index a different search string?
2. I have no clue what they mean by "Field n in the database file is described by criteria[n]". Could someone explain this to me with an example.
If I understand this I think I will understand number 1.