This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi All, I am fetching a list of all the Countries and their keys from the database. The select query is sorted by country name alphabetically. But when I use the following code the result is an unsorted list of countries. Any help is appreciated ASAP. Following is the code sample: erdManager e = new erdManager(); Hashtable ht = e.getList("Country_Key");
The problem is caused by your use of Hashtable. It sorts objects placed in it by the HashCode of the key Object. Look over the Collections Framework and choice a differnet Collection type which will give you the behavior you want. Possibly TreeSet.