K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, 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.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
John<br />SCJP 5, 97%
So I can search for 1) name only, 2) location only or 3) name and location together. Is it right? (1) and (2) is OR logic making (3) AND logic. What happens if I want to search by other fields? Or simply Sun just care about these 2 fields.
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Partner, for this method, you do not use any of them. Here's what has to be done: you get the String array, and check if field[n] starts with criteria[n]. If so, this record is included in the list of results (its number is kept in an int array, which will be the list of valid results).
Fernando Franzini - Java Blog
Fernando Franzini wrote:If the record comes with some null before some data ? I mean
# Record
# ======
#
# NAME LOCATION SIZE SMOKING RATE DATE OWNER
# SCJD Forum1 Javaranch 9999 Y $99.9 2008/12/08 12345678
# SCJD Forum2 SunSite 9999 Y $99.9 2008/12/08 12345678
#
# String array
# ============
#
# null, null, 99, null, null, null, null
The inicial field of array are null...so....Do i need confirm the next field ? because assignment said "A null value in criteria[n] matches any field value".
So.....I really dont know....I'm thinking...if the some first field are null...it already match...so you dont need continue tests another....
I'm confused...
By the way.....There are any team in brazilian soccer that can stop mine ? TIMÃOOOO EOOOOO
Regards...
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
To recap:
name only eg ["SomeName", null, null, null, null, null, null]
location only eg [null, "SomeLocation", null, null, null, null, null]
name AND location eg ["SomeName", "SomeLocation", null, null, null, null, null]
Fernando Franzini - Java Blog
Danger, 10,000 volts, very electic .... tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|