// 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);
All you are looking for anything that starts with the search parameter. You are not looking for a "contains" or "ends with".
SCJP 1.2, SCWCD, SCBCD
"I'm not back." - Bill Harding, Twister
Does the find() API allow you to return strings which do not begin with the given criteria string?
SCJP 1.2, SCWCD, SCBCD
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
SCJP 1.2, SCWCD, SCBCD
Does this mean I only have to provide a search on name and location?
SCJP,SCJD,SCWCD,SCBCD,SCDJWS,SCEA
SCJP 1.2, SCWCD, SCBCD
It must allow the user to search the data for all records, or records where the name and/or location fields match values specified by the user.
….They [customer service representatives] take requests from homeowners for a type of service and offer the homeowners one or more contractors that can provide the required services….
However, you must design your find method so that it works unchanged if another field was included in the search by the GUI client.
quote:
It must allow the user to search the data for all records
"Comma separated list of types of work this contractor can perform."
SCJP 1.2, SCWCD, SCBCD
Comma separated list of types of work this contractor can perform."
SCJP 1.2, SCWCD, SCBCD
I am displeased. You are no longer allowed to read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|