I was using arraylist to populate an optionscollection in jsp. Now i dont need duplicate elements.So i want to use hashset. If i use hashset , unlike arraylist if i want to display a blank if i add a blank as the first element and then add other data the blank is displaying at the end of the combobox. When i use arraylist if i add blank as the first element it displays at the start which is what i need.
Can any one help me to add the blank at the beginning for hashset ?
HashSetis not an ordered version of aSet. UseLinkedHashSetwhen you need an orderedSetandTreeSetwhen you need a sorted one.