Sort a Vector of custom objects

Posted by user307818 on Stack Overflow See other posts from Stack Overflow or by user307818
Published on 2010-04-02T17:17:57Z Indexed on 2010/04/02 17:33 UTC
Read the original article Hit count: 242

Filed under:

I'm trying to sort a Vector in java but my Vector is not a vector of int, it is a vector of objects

the object is:

public MyObject() {
    numObj = 0;
    price = new Price();
    pax = new Pax();        
}

so I have a Vector of MyObject and I want to order it by numObject, how do i do it, I'm new in java?

Thank you so much for all your help.

© Stack Overflow or respective owner

Related posts about java