Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

criteriaFind and single quotes

 
Reinhold Gruber
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I read a couple of threads about the criteriaFind()-Method. It seems that almost everybody used StringTokenizer to parse and split the criteria-String like that

But the criteriaString could be something like
origin='SFO, USA',destination='DEN' and countTokens() would return 5.
Is there a better way of parsing the criteria-String?
Reinhold
 
Junilu Lacar
Bartender
Pie
Posts: 8875
81
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reinhold,
Apparently, it is OK to use JDK1.4 for the current exam (see this thread), so you might want to look into using regular expressions (see the java.util.regex package in 1.4).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic