No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Implémenter les algorithmes de tri en Java...

Comme nous avons pu le remarquer dans le document consacré aux collections, pour trier des objets en Java selon leur ordre naturel, il faut que ces objets implémentent l'interface java.lang.Comparable, ce qui entrainera la réimplémentation de certaines méthodes.

ClasseOrdre naturel
Bytenumérique signé
Characternumérique non-signé
Longnumérique signé
Integer
Short
Double
Float
BigInteger
BigDecimal
Fileadresse (pathname) selon l'ordre lexicographique
dépend du système
Stringlexicographique
Datechronologique
CollationKeylexicographique selon les spécifications locales

Cette page est en cours de modification, vous pouvez trouver des exemples d'implémentations dans la page d'exercices.

Pour plus d'informations, vous pouvez consulter la page relative aux algorithmes de tris.

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 16/06/2005, last modified the 07/04/2023
Source of the printed document:https://www.gaudry.be/en/java-comparer-trier.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.