This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Possible contradiction on OCMJD assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Possible contradiction on OCMJD assignment" Watch "Possible contradiction on OCMJD assignment" New topic

Possible contradiction on OCMJD assignment

Miguel Angel Gonzalez

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

Joined: Jul 19, 2004
Posts: 7298

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
Miguel Angel Gonzalez

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
Have you checked out Aspose?
subject: Possible contradiction on OCMJD assignment
It's not a secret anymore!