Here you can find the source of areEqualEvenIfBothNull(Object first, Object second)
private static boolean areEqualEvenIfBothNull(Object first, Object second)
//package com.java2s; //License from project: Apache License public class Main { private static boolean areEqualEvenIfBothNull(Object first, Object second) { return ((first == null && second == null) || (first != null && second != null && first.equals(second))); }/*from w ww. j a v a 2 s .co m*/ }