Tuesday, February 24, 2015

Select drop-down list in jquery

  Get selected value using class :-
$(".drop_down_class").val();


Get selected value using Id :-
$("#drop_down_id").val();


Get text of selected value :-
$("#drop_down_id").text();


How to sort a hashset

Covert set into list than sort it using collection utill
A HashSet does not guarantee any order of its elements


Set unSortedHashSet = new HashSet();

List sortedList = new ArrayList(unSortedHashSet);

Collections.sort(sortedList);