This example simply shows how to use of RMS package. In this example we are
going to sort the specified string by the implementing of RecordComparator
interface as given:
class Comparator implements RecordComparator{
|
In the javax.microedition.rms package only one method is as follows:
compare(byte[] rec1, byte[] rec2):- This is the integer type method and it returns RecordComparator.PRECEDES, RecordComparator.FOLLOWS, RecordComparator.EQUIVALENT. The PRECEDES apply if rec1 precedes rec2 in sort order, the FOLLOWS apply if rec1 follows rec2 in sort order and the EQUIVALENT apply if rec1 and rec2 are equivalent in terms of sort order.
The Application is as follows:


RMSMIDlet.java
import java.io.*;
|
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: J2ME RMS Sorting Example
Post your Comment