Java tutorial
//package com.java2s; public class Main { public static boolean isEqual(Object obj1, Object obj2) { if (obj1 == null) { return obj2 == null; } return obj1.equals(obj2); } }