Android examples for java.lang:String Equals
Check two nullable string for equal
public class Main{ public static boolean equals(String str1, String str2) { return str1 == str2 || str1 != null && str1.equals(str2); }/*from w ww . jav a 2 s.c om*/ }