Here you can find the source of areEqual(String s1, String s2)
public static boolean areEqual(String s1, String s2)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean areEqual(String s1, String s2) { if (s1 == null && s2 == null) { return true; // ???? } else if (s1 == null && s2 != null) { return false; // } else if(s1 != null && s2 == null) { // return false; } else {//w ww. j a va 2s . c o m return s1.equals(s2); } } }