String abc = " India = Delhi,USA=Washington,UK=London";
I would like to get the values by specifying the country Name.If I want to get the value for India,I should get the corresponding value.I Don't want to use StringTokenizer.I want to know if there are any function in Java6 which can improve my code reading.
John de Michele
posted 6 years ago
You'll be much better off splitting that String up into a Map. Maps use key, value pairs, and allow very quick searching by keys.
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