• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

B&S in find method, n matches n?

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the instruction saying that in the find method, Field n in the database file is described by criteria[n].

Does that mean field 1 (the first column) is described by criteria[1]? Or field 0 (the first column) is described by criteria[0]? My understanding as of now is field 1 is described by criteria[1], which means criteria[0] will be no use to me, right?

I think I should get my understanding right because they might use some automatic test tools for testing this method. Or can I also write this on my choices doc? But the automatic testing results will vary from those 2.

Any ideas? Thanks.
 
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mingwei Jiang:
I have the instruction saying that in the find method, Field n in the database file is described by criteria[n].

Does that mean field 1 (the first column) is described by criteria[1]? Or field 0 (the first column) is described by criteria[0]? My understanding as of now is field 1 is described by criteria[1], which means criteria[0] will be no use to me, right?

I think I should get my understanding right because they might use some automatic test tools for testing this method. Or can I also write this on my choices doc? But the automatic testing results will vary from those 2.

Any ideas? Thanks.



As a java array must always start from position 0 so criteria[0] will always match to field[0] in the find method.
 
Get off me! Here, read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic