• Post Reply Bookmark Topic Watch Topic
  • New Topic

criteriaFind and single quotes  RSS feed

 
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
Sheriff
Posts: 11434
176
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac 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
Boost this thread!