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 5 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.