Collator SetStrength() Example

Sets this Collator's strength property.


Collatorclass SetStrength() method example. This example shows you how to use SetStrength() method.This method Sets this Collator's strength property.

Here is the code:-
/* 
 * @Program that Sets this Collator's strength property.
 * SetStrength.java 
 * Author:-RoseIndia Team
 * Date:-16-Jun-2008
 */
import java.util.*;
import java.text.*;
public class SetStrength {
public static void main(String[] args) {
Collator collate = Collator.getInstance(new Locale("US"));
int i=collate.getStrength();
System.out.println("Strength of this Collator is: "+i);
//Sets this Collator's strength property.
collate.setStrength(3);
int j=collate.getStrength();
System.out.println("Strength of this Collator is: "+j);
    }

}

Output of the program:-
 Strength of this Collator is: 2
Strength of this Collator is: 3

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US