I want to sort a vector which contains Object of following fields
public class CategoryListing   {
     String company_id;
     String company_name;
     double distance;
     //setters and getters here 
}
I populated the vector from webservice, now I want to sort that vector by distance, means I want to show nearest one. How can I sort the vector which contains objects?
 
     
     
     
     
    