Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

equals() method in java algorithm

1012   public  boolean = ( Object anObject) { 
1013       if ( this == anObject) { 
1014           return  true ; 
1015       } 
1016       if (anObject instanceof  String ) { 
1017           String anotherString = ( String ) anObject; 
1018           int n = số đếm; 
1019           if (n == anotherString.count) { 
1020               char v1 [] = value; 
1021               char v2 [] = anotherString.value; 
1022               inti = bù đắp; 
1023               int j = anotherString.offset; 
1024               while (n--! = 0) { 
1025                   if (v1 [i ++]! = V2 [j ++]) 
1026                       return  false ; 
1027               } 
1028               return  true ; 
1029           } 
1030       } 
1031       return  false ; 
1032   }
Source by helpex.vn #
 
PREVIOUS NEXT
Tagged: #method #java #algorithm
ADD COMMENT
Topic
Name
6+6 =