Android String Equal equals(String str1, String str2)

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

Description

equals

License

Apache License

Declaration

public static boolean equals(String str1, String str2) 

Method Source Code

//package com.java2s;
/**//from  w w w.j a v  a2  s .  c  o m
 * Copyright 2013 ??????
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

public class Main {

    public static boolean equals(String str1, String str2) {
        return str1 == null ? str2 == null : str1.equals(str2);
    }
}

Related

  1. isEquals(String a, String b)
  2. equals(final CharSequence cs1, final CharSequence cs2)
  3. equals(String str1, String str2)
  4. equal(String s1, String s2)
  5. isEquals(String str1, String str2)
  6. equalsIgnoreCase(String str1, String str2)
  7. equalsIgnoreCase(String string1, String string2)
  8. equals(final String target1, final String target2)
  9. equalsIgnoreCase(final String target1, final String target2)