Sign in to follow this  

type Comparable

This topic is 4399 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I presume it is Java. First of all it is not a type but an interface. Second, if you don't know what it is for don't use it and don't bother.

It is for specifying a generic interface for comparable objects, such that any algorithms implemented for comparable objects can be applied to all their specific instances.

For example you may write a sorter which sorts any object that implements the comparable interface. This way you can sort any objects (even those not known at writing-time) such as a Date-class, Integers, etc. Nice.

Illco

Share this post


Link to post
Share on other sites

This topic is 4399 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this