• Post Reply Bookmark Topic Watch Topic
  • New Topic

StringTokenizer "Key/Value" Pair Question?

 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
My criteriaFind() method is working fine,but it is only limited to the Origin & Destination Fields.What i have to do, to make my
citeriaFind() method generic.With the help of StringTokenizer
i am getting the "Key/Value" pair in a form of String values.How to convert my Key according to the Field.Because in find method
values[]=readRecord(); it requires values[Key].equals(Value).
Here Key is required as an Int value but StringTokenizer is returning Key as a String,Plz help me out to solve this problem how to convert my Key value to a specific field(Int) value.
Anurag Mishra
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Integer class. especially the parseInt(String s) method.
Mark
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!