CollatorTest.java

import java.text.*;
import java.util.*;
public class CollatorTest {
  public static void main(String[] args) {
    Collator collator = Collator.getInstance(Locale.FRANCE);
    collator.setStrength(Collator.PRIMARY);
    System.out.println(collator.compare("e","")); // Affiche : 0
    collator.setStrength(Collator.SECONDARY);
    System.out.println(collator.compare("e","")); // Affiche : -1
    System.out.println(collator.compare("e","E")); // Affiche : 0
    collator.setStrength(Collator.TERTIARY);
    System.out.println(collator.compare("e","E")); // Affiche : -1    
  }
}