• Post Reply Bookmark Topic Watch Topic
  • New Topic

Array vs Vector&HashMap

 
dennis deng
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, guys,
in my criteriaFind method, I have to use 2 Vector and 1 HashMap. I also can replace this with arrays and a lot of loop blocks. which if clarity and efficiency? does some one else has good search algorithm?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the instructions simplicity and clarity should take precedence over efficiency. But by all means use ArrayList instead of Vector.
- Peter
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!