Java tutorial
//package com.java2s; //License from project: Apache License public class Main { /** * Compare two objects for equality. * * @param o1 one object * @param o2 another object * @return true if equals, false otherwise */ public static boolean isEquals(Object o1, Object o2) { return (o1 == o2) || (o1 != null && o1.equals(o2)); } }