Question
How can i sort a array of object based on a specific value? In my case the "leeftijd" (age) value?
CODE
Klant[] klantarray = new Klant[2];
klantarray[0] = new Klant("Brian ", "van den ", "Heuvel", +
21, true, "Krimpen aan den IJssel", "brian@me.com");
klantarray[1] = new Klant("piet", "","mak", 96, true, "Rotterdam",+
"pietje@rdam.com");
I need to sort it on the values 96 and 21, where 21 comes on top of the (new) list. and 96 at the bottom.
There will be more objectes added in due time.
i want to use the Mergesort but i have no idea how to use it