Here you can find the source of areEqual(String str1, String str2)
public static boolean areEqual(String str1, String str2)
//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 }