Here you can find the source of areEqual(final Object object0, final Object object1)
Parameter | Description |
---|---|
object0 | first object we are comparing |
object1 | second object we are comparing |
public static boolean areEqual(final Object object0, final Object object1)
//package com.java2s; public class Main { /**//from ww w . ja va 2s . co m * Whether two objects are equal, without throwing * a null pointer exception. * @param object0 first object we are comparing * @param object1 second object we are comparing * @return true if they are the same, false otherwise */ public static boolean areEqual(final Object object0, final Object object1) { if ((object0 == null) && (object1 == null)) { return true; } if ((object0 == null) || (object1 == null)) { return false; } return object0.equals(object1); } }