Collator Equals1() Example

Convenience method for comparing the equality of two strings based on this Collator's collation rules.


Collatorclass Equals1() method example. This example shows you how to use Equals1() method.This method Convenience method for comparing the equality of two strings based on this Collator's collation rules.

Here is the code:-
/* 
 * @Program that gives a Convenience method for comparing the equality of two strings 
    based on this Collator's collation rules.
 * Equals1.java 
 * Author:-RoseIndia Team
 * Date:-16-Jun-2008
 */

import java.util.*;
import java.text.*;
public class Equals1 {
public static void main(String[] args) {
 Collator collate = Collator.getInstance();
 String s="erhjfkwe";
 String s1="erhjfkwekgujiorj";
 //Convenience method for comparing the equality of two strings 
 boolean b=collate.equals(s, s1);
 System.out.println("Equals : "+b);
    }
}

Output of the program:-
 Equals : false

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

HOME | COPYRIGHT | CONTACT US