Java String Equal areEqual(String str1, String str2)

Here you can find the source of areEqual(String str1, String str2)

Description

are Equal

License

Open Source License

Declaration

public static boolean areEqual(String str1, String str2) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean areEqual(String str1, String str2) {
        return (str1 == null && str2 == null) || (str1 != null && str1.equals(str2))
                || (str2 != null && str2.equals(str1));
    }//  w  w  w. java2s .  com
}

Related

  1. areEqual(String expected, String actual)
  2. areEqual(String s1, String s2)
  3. areEqual(String s1, String s2)
  4. areEqual(String s1, String s2)
  5. areEqual(String seq1, String seq2)
  6. areEqual(String string1, String string2)
  7. areEqual(String string1, String string2)
  8. areEqual(String thisString, String thatString)
  9. areEqualConstantTime(String a, String b)