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