| Author |
Possible contradiction on OCMJD assignment
|
Miguel Angel Gonzalez
Greenhorn
Joined: Aug 27, 2011
Posts: 12
|
|
Hey there
I am currently developing my solution for the OCMJD assignment (Bodgitt and Scarper v.2.3.1), and I guess that I found a contradiction between the instructions (the html file) and the provided interface. The think is that instructions says:
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
and comments in the method 'find(String[] criteria)' in the interface says:
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".)
I guess, that I should take the instructions in the html file as the correct way to go and search for the exact matches, but I would like to know the guru's opinion on this
Thanks in advance for any help!
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4352
|
|
|
This must be one of the most asked questions in this forum. Using the search engine will give you a bunch of answers: the most recent one can be found here.
|
SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
|
 |
Miguel Angel Gonzalez
Greenhorn
Joined: Aug 27, 2011
Posts: 12
|
|
Thanks a lot Roel, you resolved my doubt with this simple comment on the another post:
filtering the results returned by the find-method
I did not have idea that this question were already asked :P, next time I will search before ask
|
 |
 |
|
|
subject: Possible contradiction on OCMJD assignment
|
|
|