compare : Java Glossary


To be able to sort Objects in order, you must be able to compare them. There are two interfaces: java.lang.Comparable and java.util.Comparator. You need to implement one or both of them to use the various ordered collections and sorts. java.lang.Comparable is used to define the natural sort order of a class. java.util.Comparator is used to define a special sort order for a class.

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
no blog for this page
Your face IP:[]
You are visitor number