The compare() method is a method of the RecordComparator interface. It is used to compare two values in a record store for sorting. The general syntax of this method is as follows:
Here, the rec1 parameter denotes the value of the first record to be compared.
The rec2 parameter denotes the value of the second record to be compared.
This comparison returns one of the following predefined integer values:
- EQUIVALENT
- PRECEDES
- FOLLOWS
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
